]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
P0145R2: Refining Expression Order for C++.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f7e4f2e3
DM
12016-06-13 David Malcolm <dmalcolm@redhat.com>
2
3 * c-parser.c (c_parser_initelt): Provide location of name for new
4 location_t param of set_init_label.
5 * c-tree.h (set_init_label): Add location_t param.
6 * c-typeck.c (set_init_index): Add "fieldname_loc" location_t
7 param and use it when issuing error messages about unrecognized
8 field names. Attempt to provide a fixit hint if appropriate,
9 otherwise update the error message to provide the type name.
10
4b1ffdb1
TS
112016-06-10 Thomas Schwinge <thomas@codesourcery.com>
12
13 PR c/71381
14 * c-parser.c (c_parser_omp_variable_list) <OMP_CLAUSE__CACHE_>:
15 Loosen checking.
16
44a845ca
MS
172016-06-08 Martin Sebor <msebor@redhat.com>
18 Jakub Jelinek <jakub@redhat.com>
19
20 PR c++/70507
21 PR c/68120
22 * c-typeck.c (convert_arguments): Don't promote last argument
23 of BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
24
92a5f2ba
MP
252016-06-08 Marek Polacek <polacek@redhat.com>
26
27 PR c/71418
28 * c-decl.c (grokdeclarator): Check TYPE_P.
29
08203f73
MP
30 PR c/71426
31 * c-decl.c (get_parm_info): Don't crash on an assert on invalid
32 code.
33
6ffd47b7
DM
342016-06-07 David Malcolm <dmalcolm@redhat.com>
35
36 * c-parser.c (c_parser_postfix_expression): In __builtin_offsetof
37 and structure element reference, capture the location of the
38 element name token and pass it to build_component_ref.
39 (c_parser_postfix_expression_after_primary): Likewise for
40 structure element dereference.
41 (c_parser_omp_variable_list): Likewise for
42 OMP_CLAUSE_{_CACHE, MAP, FROM, TO},
43 * c-tree.h (build_component_ref): Add location_t param.
44 * c-typeck.c (build_component_ref): Add location_t param
45 COMPONENT_LOC. Use it, if available, when issuing hints about
46 mispelled member names to provide a fixit replacement hint.
47
1f40cff3
MP
482016-06-06 Marek Polacek <polacek@redhat.com>
49
50 PR c/71362
51 * c-parser.c (c_parser_direct_declarator): Set location.
52
5545a907
MP
532016-06-06 Marek Polacek <polacek@redhat.com>
54
55 * c-typeck.c (comptypes_internal): Handle comparisons of
56 INTEGER_TYPE, FIXED_POINT_TYPE, and REAL_TYPE nodes. Don't check
57 TYPE_REF_CAN_ALIAS_ALL.
58
b605f663
CLT
592016-06-03 Chung-Lin Tang <cltang@codesourcery.com>
60
61 * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction
62 arguments as addressable when async clause exists.
63
00631022
JJ
642016-05-30 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/71349
67 * c-parser.c (c_parser_omp_for): Don't disallow nowait clause
68 when combined with target construct.
69
7211a097
JJ
702016-05-26 Jakub Jelinek <jakub@redhat.com>
71
72 * c-parser.c (c_parser_omp_clause_schedule): Warn if
73 OMP_CLAUSE_SCHEDULE_CHUNK_EXPR is known not to be positive.
74
95efe6b6
MP
752016-05-25 Marek Polacek <polacek@redhat.com>
76
77 PR c/71265
78 * c-decl.c (c_make_fname_decl): Don't check seen_error.
79
a23faf7a
MP
80 PR c/71266
81 * c-decl.c (store_parm_decls_oldstyle): Skip non-PARM_DECLs.
82
e46c7770
CP
832016-05-24 Cesar Philippidis <cesar@codesourcery.com>
84
85 * c-parser.c (c_parser_oacc_declare): Add support for
86 GOMP_MAP_FIRSTPRIVATE_POINTER.
87 * c-typeck.c (handle_omp_array_sections_1): Replace bool is_omp
88 argument with enum c_omp_region_type ort.
89 (handle_omp_array_sections): Likewise. Update call to
90 handle_omp_array_sections_1.
91 (c_finish_omp_clauses): Add specific errors and warning messages for
92 OpenACC. Use firsrtprivate pointers for OpenACC subarrays. Update
93 call to handle_omp_array_sections.
94
a04e69c0
TS
952016-05-24 Thomas Schwinge <thomas@codesourcery.com>
96
97 * c-parser.c (c_parser_oacc_routine): Tighten syntax checks.
98
f17a223d
RB
992016-05-24 Richard Biener <rguenther@suse.de>
100
101 PR middle-end/70434
102 PR c/69504
103 * c-typeck.c (build_array_ref): Do not complain about indexing
104 non-lvalue vectors. Adjust for function name change.
105
79063edd
MS
1062016-05-20 Martin Sebor <msebor@redhat.com>
107
108 PR c/71115
109 * c-typeck.c (error_init): Use
110 expansion_point_location_if_in_system_header.
111 (warning_init): Same.
112
8a40fef3
DM
1132016-05-19 David Malcolm <dmalcolm@redhat.com>
114
115 PR c/71171
116 * c-parser.c (c_parser_generic_selection): Use c_expr::set_error
117 in error-handling.
118 (c_parser_postfix_expression): Likewise.
119 * c-tree.h (c_expr::set_error): New method.
120 * c-typeck.c (parser_build_binary_op): In error-handling, ensure
121 that result's range is initialized.
122
e9892350
JG
1232016-05-17 James Greenhalgh <james.greenhalgh@arm.com>
124
125 * c-typeck.c (parser_build_unary_op): Fix formatting.
126
8fad45f5
MW
1272016-05-16 Matthew Wahab <matthew.wahab@arm.com>
128
129 * c-decl.c (grokdeclarator): Remove errmsg and use of
130 targetm.invalid_return_type.
131 (grokparms): Remove errmsg and use of
132 targetm.invalid_parameter_type.
133
aa4b467b
JM
1342016-05-13 Joseph Myers <joseph@codesourcery.com>
135
136 * c-decl.c (grokdeclarator): For C11, discard qualifiers on
137 function return type.
138
4f2e1536
MP
1392016-05-12 Marek Polacek <polacek@redhat.com>
140
141 PR c/70756
142 * c-decl.c (build_compound_literal): Pass LOC down to
143 c_incomplete_type_error.
144 * c-tree.h (require_complete_type): Adjust declaration.
145 (c_incomplete_type_error): Likewise.
146 * c-typeck.c (require_complete_type): Add location parameter, pass it
147 down to c_incomplete_type_error.
148 (c_incomplete_type_error): Add location parameter, pass it down to
149 error_at.
150 (build_component_ref): Pass location down to c_incomplete_type_error.
151 (default_conversion): Pass location down to require_complete_type.
152 (build_array_ref): Likewise.
153 (build_function_call_vec): Likewise.
154 (convert_arguments): Likewise.
155 (build_unary_op): Likewise.
156 (build_c_cast): Likewise.
157 (build_modify_expr): Likewise.
158 (convert_for_assignment): Likewise.
159 (c_finish_omp_clauses): Likewise.
160
d6e83a8d
MM
1612016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
162
163 PR c/43651
164 * c-decl.c (declspecs_add_qual): Warn when -Wduplicate-decl-specifier
165 is enabled.
166 * c-errors.c (pedwarn_c90): Return true if warned.
167 * c-tree.h (pedwarn_c90): Change return type to bool.
168 (enum c_declspec_word): Add new enumerator cdw_atomic.
169
5c3a10fb
MP
1702016-05-11 Marek Polacek <polacek@redhat.com>
171
172 PR c++/71024
173 * c-decl.c (diagnose_mismatched_decls): Factor out code to
174 diagnose_mismatched_attributes and call it.
175
cf68d92c
MP
1762016-05-10 Marek Polacek <polacek@redhat.com>
177
178 PR c/70255
179 * c-decl.c (diagnose_mismatched_decls): Warn for optimize attribute
180 on a declaration following the definition.
181
351f85c5
JJ
1822016-05-05 Jakub Jelinek <jakub@redhat.com>
183
184 * c-parser.c (c_parser_switch_statement): Add IF_P argument,
185 parse it through to c_parser_c99_block_statement.
186 (c_parser_statement_after_labels): Adjust c_parser_switch_statement
187 caller.
188
deef7113
MP
1892016-05-04 Marek Polacek <polacek@redhat.com>
190
191 * c-parser.c (c_parser_if_statement): Replace OPT_Wparentheses with
192 OPT_Wdangling_else.
193
de55efd5
MP
1942016-05-04 Marek Polacek <polacek@redhat.com>
195
196 PR c/48778
197 * c-typeck.c (build_binary_op): Don't issue -Waddress warnings
198 for macro expansions.
199
79ce98bc
MP
2002016-05-03 Marek Polacek <polacek@redhat.com>
201
202 PR c/70859
203 * c-typeck.c (build_function_call_vec): Pass LOC and ARG_LOC down to
204 check_builtin_function_arguments.
205
fb2647aa
RB
2062016-05-03 Richard Biener <rguenther@suse.de>
207
208 * Make-lang.in (cc1-checksum.c): For stage-final re-use
209 the checksum from the previous stage.
210
77886428
CP
2112016-05-02 Cesar Philippidis <cesar@codesourcery.com>
212
213 * c-parser.c (c_parser_oacc_all_clauses): Update call to
214 c_finish_omp_clauses.
215 (c_parser_omp_all_clauses): Likewise.
216 (c_parser_oacc_cache): Likewise.
217 (c_parser_oacc_loop): Likewise.
218 (omp_split_clauses): Likewise.
219 (c_parser_omp_declare_target): Likewise.
220 (c_parser_cilk_all_clauses): Likewise.
221 (c_parser_cilk_for): Likewise.
222 * c-typeck.c (c_finish_omp_clauses): Replace bool arguments
223 is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort.
224
7176a4a0
MP
2252016-05-02 Marek Polacek <polacek@redhat.com>
226
227 PR c/70851
228 * c-decl.c (grokdeclarator): Diagnose when array's size has an
229 incomplete type.
230
e7ff0319
CP
2312016-04-29 Cesar Philippidis <cesar@codesourcery.com>
232
233 PR middle-end/70626
234 * c-parser.c (c_parser_oacc_loop): Don't augment mask with
235 OACC_LOOP_CLAUSE_MASK.
236 (c_parser_oacc_kernels_parallel): Update call to
237 c_oacc_split_loop_clauses.
238
9f405ce1
AM
2392016-04-28 Andrew MacLeod <amacleod@redhat.com>
240
241 * c-array-notation.c (fix_builtin_array_notation_fn): Fix final
242 argument to build_modify_expr in two cases.
243
c1e1f433
BS
2442016-04-27 Bernd Schmidt <bschmidt@redhat.com>
245
246 * c-parser.c (c_parser_postfix_expression_after_primary): Call
247 warn_for_memset instead of warning directly here.
248
2448a956
MP
2492016-04-26 Marek Polacek <polacek@redhat.com>
250
251 PR c/67784
252 * c-parser.c (c_parser_maybe_reclassify_token): New function factored
253 out of ...
254 (c_parser_for_statement): ... here.
255 (c_parser_if_statement): Use it.
256 (c_parser_switch_statement): Use it.
257 (c_parser_while_statement): Use it.
258
b02a5e26
MP
259 PR c/70791
260 * c-decl.c (pushdecl): Pass LOCUS down to warning.
261
477d4906
IV
2622016-04-20 Ilya Verbin <ilya.verbin@intel.com>
263
264 PR c++/69363
265 * c-parser.c (c_parser_cilk_all_clauses): Use c_finish_omp_clauses
266 instead of c_finish_cilk_clauses.
267 * c-tree.h (c_finish_omp_clauses): Add new default argument.
268 * c-typeck.c (c_finish_omp_clauses): Add new argument. Allow
269 floating-point variables in the linear clause for Cilk Plus.
270
fe37c7af
MM
2712016-04-18 Michael Matz <matz@suse.de>
272
273 * c-decl.c (merge_decls): Use SET_DECL_ALIGN and SET_TYPE_ALIGN.
274 (grokdeclarator, parser_xref_tag, finish_enum): Use SET_TYPE_ALIGN.
275
949505a9
MP
2762016-04-15 Marek Polacek <polacek@redhat.com>
277
278 PR c/70671
279 * c-typeck.c (build_unary_op): Pass location down to error and
280 warning call.
281
dda1bf61
JJ
2822016-04-15 Jakub Jelinek <jakub@redhat.com>
283
284 PR c/70436
285 * c-parser.c (c_parser_pragma): Add IF_P argument, pass it down
286 where needed.
287 (c_parser_external_declaration, c_parser_struct_or_union_specifier,
288 c_parser_parameter_declaration, c_parser_compound_statement_nostart,
289 c_parser_objc_class_instance_variables, c_parser_objc_methodprotolist):
290 Adjust c_parser_pragma callers.
291 (c_parser_statement_after_labels): Likewise. Adjust c_parser_cilk_for
292 caller.
293 (c_parser_omp_structured_block): Add IF_P argument, pass it down to
294 c_parser_statement.
295 (c_parser_oacc_data, c_parser_oacc_host_data, c_parser_oacc_loop,
296 c_parser_oacc_kernels_parallel, c_parser_omp_critical,
297 c_parser_omp_simd, c_parser_omp_for, c_parser_omp_master,
298 c_parser_omp_ordered, c_parser_omp_parallel, c_parser_omp_single,
299 c_parser_omp_task, c_parser_omp_taskgroup, c_parser_omp_distribute,
300 c_parser_omp_teams, c_parser_omp_target_data, c_parser_omp_target,
301 c_parser_omp_taskloop, c_parser_omp_construct, c_parser_cilk_grainsize,
302 c_parser_cilk_simd, c_parser_cilk_for): Add IF_P argument, pass it
303 down where needed.
304 (c_parser_omp_for_loop): Likewise. Clear IF_P if nbraces.
305 (c_parser_omp_sections_scope): Adjust c_parser_omp_structured_block
306 calls.
307
99cd9857
MP
3082016-04-13 Marek Polacek <polacek@redhat.com>
309
310 PR c/70436
311 * c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
312 adjust callers.
313 (c_parser_statement): Likewise.
314 (c_parser_c99_block_statement): Likewise.
315 (c_parser_while_statement): Likewise.
316 (c_parser_for_statement): Likewise.
317 (c_parser_if_body): Don't set IF_P here.
318 (c_parser_if_statement): Add IF_P argument. Set IF_P here. Warn
319 about dangling else here.
320 * c-tree.h (c_finish_if_stmt): Adjust declaration.
321 * c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter. Don't
322 warn about dangling else here.
323
f13355da
MP
3242016-04-04 Marek Polacek <polacek@redhat.com>
325
326 PR c/70307
327 * c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.
328
5fde6a45
MP
3292016-03-31 Marek Polacek <polacek@redhat.com>
330
331 PR c/70297
332 * c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.
333
4bbf545b
DM
3342016-03-18 David Malcolm <dmalcolm@redhat.com>
335
336 PR c/70281
337 * c-parser.c (c_parser_postfix_expression): Set the source range
338 for uses of "__builtin_types_compatible_p".
339
fcc2b74f
JJ
3402016-03-17 Jakub Jelinek <jakub@redhat.com>
341
342 PR c/70280
343 * c-typeck.c (composite_type): Don't count void_list_node
344 into len, if the list is terminated by void_list_node, start
345 with void_list_node instead of NULL for newargs. Stop
346 at void_list_node.
347
ab4c578f
MP
3482016-03-16 Marek Polacek <polacek@redhat.com>
349
350 PR c/70093
351 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
352 nested functions returning VM types.
353
96b3c82d
CP
3542016-03-09 Cesar Philippidis <cesar@codesourcery.com>
355
356 * c-parser.c (c_parser_oacc_loop): Update cclauses and clauses
357 when calling c_finish_omp_clauses.
358
29b9828f
BS
3592016-03-04 Bernd Schmidt <bschmidt@redhat.com>
360
361 PR c/69824
362 * c-decl.c (get_parm_info): Don't queue implicit function declarations
363 for later.
364
7ff6ca38
MP
3652016-03-04 Marek Polacek <polacek@redhat.com>
366
367 PR c/69798
368 * c-parser.c (c_parser_postfix_expression): Call
369 c_parser_cast_expression rather than c_parser_postfix_expression.
370
686e2237
JJ
3712016-03-01 Jakub Jelinek <jakub@redhat.com>
372
373 PR c/69796
374 PR c/69974
375 * c-parser.c (c_parser_translation_unit): Don't change TREE_TYPE
376 of incomplete decls to error_mark_node.
377
0b05329b
MP
3782016-02-24 Marek Polacek <polacek@redhat.com>
379
380 PR c/69819
381 * c-decl.c (finish_decl): Don't update the copy of the type of a
382 different decl type.
383
067fbd8b
JJ
3842016-02-23 Jakub Jelinek <jakub@redhat.com>
385
386 PR objc/69844
387 * c-parser.c (c_parser_for_statement): Properly handle ObjC classes
388 in id_kind reclassification.
389
bf14eba2
JJ
3902016-02-16 Jakub Jelinek <jakub@redhat.com>
391
392 PR c/69835
393 * c-typeck.c (build_binary_op): Revert 2015-09-09 change.
394
ba539195
JN
3952016-02-16 James Norris <jnorris@codesourcery.com>
396
397 PR c/64748
398 * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms.
399
16595a1f
BS
4002016-02-12 Bernd Schmidt <bschmidt@redhat.com>
401
f48dfe98
BS
402 * c-decl.c (build_null_declspecs): Zero the entire struct.
403
16595a1f
BS
404 PR c/69522
405 * c-parser.c (c_parser_braced_init): New arg outer_obstack. All
406 callers changed. If nested_p is true, use it to call
407 finish_implicit_inits.
408 * c-tree.h (finish_implicit_inits): Declare.
409 * c-typeck.c (finish_implicit_inits): New function. Move code
410 from ...
411 (push_init_level): ... here.
412 (set_designator, process_init_element): Call finish_implicit_inits.
413
66756373
JJ
4142016-02-11 Jakub Jelinek <jakub@redhat.com>
415
416 PR c/69768
417 * c-typeck.c (parser_build_binary_op): Strip nops from integer_zerop
418 arguments for -Waddress warning.
419
1066e9b5
JJ
4202016-02-04 Jakub Jelinek <jakub@redhat.com>
421
422 PR c/69669
423 * c-decl.c (finish_enum): When honoring mode attribute,
424 make sure to use proper TYPE_MIN_VALUE and TYPE_MAX_VALUE.
425
3a5d2ba4
JJ
4262016-01-29 Jakub Jelinek <jakub@redhat.com>
427
428 PR debug/69518
429 * c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
430 all type variants, not just TYPE_MAIN_VARIANT.
431
cbdd8ae0
JJ
4322016-01-27 Jakub Jelinek <jakub@redhat.com>
433
434 PR debug/66869
435 * c-decl.c (c_write_global_declarations_1): Warn with
436 warn_unused_function if static prototype without definition
437 is not C_DECL_USED.
438
fa74a4bc
MP
4392016-01-27 Marek Polacek <polacek@redhat.com>
440
441 PR c/68062
442 * c-typeck.c (build_binary_op) [EQ_EXPR, GE_EXPR]: Promote operand
443 to unsigned, if needed. Add -Wsign-compare warning.
444
13f92e8d
JJ
4452016-01-26 Jakub Jelinek <jakub@redhat.com>
446
447 PR tree-optimization/69483
448 * c-parser.c (c_parser_translation_unit): Use FOR_EACH_VEC_ELT.
449
cd8e73dc 4502016-01-20 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
d25c7690
PK
451
452 PR c/24293
453 * c-tree.h (incomplete_record_decls): Declare.
454 * c-parser.c (incomplete_record_decls): Define.
455 (c_parser_translation_unit): Iterate through incomplete_record_decls and
456 report error if any decl has zero size.
457 * c-decl.c (finish_decl): Append static decl with incomplete struct/union
458 or enum type to incomplete_record_decls.
459
e6d6ec9e
TV
4602016-01-14 Tom de Vries <tom@codesourcery.com>
461
462 PR tree-optimization/68773
463 * c-parser.c (c_parser_oacc_declare, c_parser_omp_declare_target): Don't
464 set force_output.
465
00083992
MP
4662016-01-14 Marek Polacek <polacek@redhat.com>
467
468 PR c/69262
469 * c-decl.c (grokdeclarator): Provide more information for invalid
470 array declarations.
471
7443cf13
DM
4722016-01-06 David Malcolm <dmalcolm@redhat.com>
473
474 * c-parser.c (c_parser_unary_expression): For dereferences, build
475 a combined location before calling build_indirect_ref, so that
476 error reports cover the full range, manually updating the c_expr
477 src_range.
478
6b131d5b
MP
4792016-01-06 Marek Polacek <polacek@redhat.com>
480
481 PR sanitizer/69099
482 * c-convert.c (convert) [INTEGER_TYPE]: Drop ARG. Don't pass ARG to
483 ubsan_instrument_float_cast. Fold EXPR. Use NULL_TREE instead of
484 NULL.
485
818ab71a
JJ
4862016-01-04 Jakub Jelinek <jakub@redhat.com>
487
488 Update copyright years.
489
2fe0a208
MP
4902016-01-04 Marek Polacek <polacek@redhat.com>
491
492 PR c/68908
493 * c-typeck.c (build_atomic_assign): Improve commentary. Add
494 optimization to use __atomic_fetch_* built-in if possible.
495
c7b48c8a
TS
4962015-12-23 Thomas Schwinge <thomas@codesourcery.com>
497
498 * c-parser.c (c_parser_oacc_clause_use_device): Merge function
499 into...
500 (c_parser_omp_clause_use_device_ptr): ... this function. Adjust
501 all users.
502
fda5652f
MP
5032015-12-22 Marek Polacek <polacek@redhat.com>
504
505 PR c/69002
506 * c-typeck.c (build_component_ref): Warn when acessing elements of
507 atomic structures or unions.
508
745e411d
DM
5092015-12-21 David Malcolm <dmalcolm@redhat.com>
510
511 * c-typeck.c: Include "gcc-rich-location.h".
512 (build_binary_op): In the two places that call binary_op_error,
513 create a gcc_rich_location and populate it with the location of
514 the binary op and its two operands.
515
94c40e19
DM
5162015-12-16 David Malcolm <dmalcolm@redhat.com>
517
518 * c-parser.c (c_parser_statement_after_labels): When calling
519 c_finish_return, Use the return expression's location if it has
520 one, falling back to the location of the first token within it.
521 * c-typeck.c (c_finish_return): When issuing warnings about
522 the incorrect presence/absence of a return value, issue a note
523 showing the declaration of the function.
524
de67c4c3
DM
5252015-12-16 David Malcolm <dmalcolm@redhat.com>
526
527 * c-parser.c (struct c_parser): Expand array "tokens_buf" from 2
528 to 4.
529 (c_parser_peek_nth_token): New function.
530 (c_parser_peek_conflict_marker): New function.
531 (c_parser_error): Detect conflict markers and report them as such.
532
a10704e1
DM
5332015-12-16 David Malcolm <dmalcolm@redhat.com>
534
535 * c-parser.c (c_parser_postfix_expression): Use EXPR_LOC_OR_LOC
536 to preserve range information for the primary expression
537 in the call to c_parser_postfix_expression_after_primary.
538
8062bca6
DM
5392015-12-16 David Malcolm <dmalcolm@redhat.com>
540
541 * c-parser.c (c_parser_static_assert_declaration_no_semi): Use the
542 expression location, falling back on the first token location,
543 rather than always using the latter.
544
d06f8b75
MP
5452015-12-16 Marek Polacek <polacek@redhat.com>
546
547 PR c/64637
548 * c-typeck.c (c_process_expr_stmt): Use location of the expression if
549 available.
550
2994fb91
MP
5512015-12-15 Marek Polacek <polacek@redhat.com>
552
553 PR c/68907
554 * c-typeck.c (build_atomic_assign): Set TREE_NO_WARNING on an
555 artificial decl.
556
a1b93f8d
DM
5572015-12-08 David Malcolm <dmalcolm@redhat.com>
558
559 * c-parser.c (c_parser_alignof_expression): Capture location of
560 closing parenthesis (if any), or of end of unary expression, and
561 use it to build a src_range for the expression.
562
46c6e1e2
DM
5632015-12-08 David Malcolm <dmalcolm@redhat.com>
564
565 PR c/68757
566 * c-parser.c (c_parser_get_builtin_args): Add
567 "out_close_paren_loc" param, and write back to it.
568 (c_parser_postfix_expression): Capture the closing
569 parenthesis location for RID_CHOOSE_EXPR,
570 RID_BUILTIN_CALL_WITH_STATIC_CHAIN, RID_BUILTIN_COMPLEX,
571 RID_BUILTIN_SHUFFLE and use it to set the source range
572 for such expressions; within RID_BUILTIN_COMPLEX set
573 the underlying location.
574
66189108
MP
5752015-12-07 Marek Polacek <polacek@redhat.com>
576
577 PR c/68668
578 * c-decl.c (grokdeclarator): If ORIG_QUAL_INDIRECT is indirect, use
579 TREE_TYPE of ORIG_QUAL_TYPE, otherwise decrement ORIG_QUAL_INDIRECT.
580
f187980b
EB
5812015-12-04 Eric Botcazou <ebotcazou@adacore.com>
582
583 * c-tree.h (c_build_va_arg): Adjust prototype.
584 * c-parser.c (c_parser_postfix_expression): Adjust call to above.
585 * c-typeck.c (c_build_va_arg): Rename LOC parameter to LOC2, add LOC1
586 parameter, adjust throughout and issue an error if EXPR is a component
587 with reverse storage order.
588
4250754e
JM
5892015-12-02 Jason Merrill <jason@redhat.com>
590
591 * c-fold.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
592 (c_fully_fold_internal, decl_constant_value_for_optimization):
593 Move from c-common.c.
594 * c-tree.h: Declare decl_constant_value_for_optimization.
595 * Make-lang.in (C_AND_OBJC_OBJS): Add c-fold.o.
596
e9e32ee6
JM
5972015-12-02 Joseph Myers <joseph@codesourcery.com>
598
599 PR c/68162
600 * c-decl.c (grokdeclarator): Set first_non_attr_kind before
601 following link from declarator to next declarator. Track original
602 qualified type and pass it to c_build_qualified_type.
603 * c-typeck.c (c_build_qualified_type): Add arguments
604 orig_qual_type and orig_qual_indirect.
605
ff7a55bf
TS
6062015-12-02 Thomas Schwinge <thomas@codesourcery.com>
607
608 * c-parser.c (c_parser_omp_clause_name)
609 (c_parser_oacc_all_clauses): Alphabetical sorting.
610
657e4e47
JJ
6112015-12-02 Jakub Jelinek <jakub@redhat.com>
612
613 PR c/68533
614 * c-decl.c (get_parm_info): Use b->locus instead of input_location
615 for diagnostics.
616
37d5ad46
JB
6172015-12-01 Julian Brown <julian@codesourcery.com>
618 Cesar Philippidis <cesar@codesourcery.com>
619 James Norris <James_Norris@mentor.com>
620
621 * c-parser.c (c_parser_omp_clause_name): Add use_device support.
622 (c_parser_oacc_clause_use_device): New function.
623 (c_parser_oacc_all_clauses): Add use_device support.
624 (OACC_HOST_DATA_CLAUSE_MASK): New macro.
625 (c_parser_oacc_host_data): New function.
626 (c_parser_omp_construct): Add host_data support.
627 * c-tree.h (c_finish_oacc_host_data): Add prototype.
628 * c-typeck.c (c_finish_oacc_host_data): New function.
629 (c_finish_omp_clauses): Add use_device support.
630
a4850ce9
JH
6312015-11-29 Jan Hubicka <hubicka@ucw.cz>
632
633 PR c/67106
634 * c-decl.c: Set TYPE_PACKED in variants.
635
b58d3df2
ML
6362015-11-27 Martin Liska <mliska@suse.cz>
637
638 PR c++/68312
639 * c-array-notation.c (fix_builtin_array_notation_fn):
640 Use release_vec_vec instead of vec::release.
641 (build_array_notation_expr): Likewise.
642 (fix_conditional_array_notations_1): Likewise.
643 (fix_array_notation_expr): Likewise.
644 (fix_array_notation_call_expr): Likewise.
645
aec17bfe
JJ
6462015-11-27 Jakub Jelinek <jakub@redhat.com>
647
648 PR c/63326
649 * c-parser.c (c_parser_compound_statement_nostart): If
650 last_label is true, use pragma_stmt instead of pragma_compound
651 as second c_parser_pragma argument.
652 (c_parser_omp_ordered, c_parser_omp_target_update,
653 c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Pass
654 false as second argument to c_parser_skip_to_pragma_eol after
655 diagnosing standalone directives used in pragma_stmt context.
656
688c4de0
IV
6572015-11-24 Ilya Verbin <ilya.verbin@intel.com>
658
659 * c-parser.c (c_parser_oacc_declare): Replace "ifdef ENABLE_OFFLOADING"
660 with "if (ENABLE_OFFLOADING)".
661
cbd03aee
DM
6622015-11-23 David Malcolm <dmalcolm@redhat.com>
663
664 PR objc/68438
665 * c-parser.c (c_parser_postfix_expression): Set up source ranges
666 for various Objective-C constructs: Class.name syntax,
667 @selector(), @protocol(), @encode(), and [] message syntax.
668
a87a86e1
DM
6692015-11-20 David Malcolm <dmalcolm@redhat.com>
670
671 PR 62314
672 * c-typeck.c (should_suggest_deref_p): New function.
673 (build_component_ref): Special-case POINTER_TYPE when
674 generating a "not a structure of union" error message, and
675 suggest a "->" rather than a ".", providing a fix-it hint.
676
8ece8dfb
DM
6772015-11-19 David Malcolm <dmalcolm@redhat.com>
678
679 * c-typeck.c (lookup_field_fuzzy): Move determination of closest
680 candidate into a new function, find_closest_identifier.
681
433068cc
MP
6822015-11-19 Marek Polacek <polacek@redhat.com>
683
684 PR c/68412
685 * c-typeck.c (parser_build_binary_op): Properly handle
686 C_MAYBE_CONST_EXPR before calling warn_tautological_cmp.
687
bef08b71
DM
6882015-11-17 David Malcolm <dmalcolm@redhat.com>
689
690 * c-parser.c (set_c_expr_source_range): Bulletproof both
691 overloaded implementations against NULL expr->value.
692 (c_parser_braced_init): Set src_range for "ret" to a sane pair of
693 values.
694 (c_parser_unary_expression): Likewise when handling addresses of
695 labels.
696 (c_parser_postfix_expression): Likewise for statement expressions,
697 for __FUNCTION__, __PRETTY_FUNCTION_ and __func__ keywords, for
698 __builtin_va_arg, and for __builtin_offset_of.
699 (c_parser_postfix_expression_after_paren_type): Initialize expr's
700 src_range using the range of the braced initializer.
701 (c_parser_transaction_expression): Set src_range for "ret" to a
702 sane pair of values.
703
fff77217
KY
7042015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
705
706 * c-parser.c (c_finish_omp_declare_simd): Look for
707 "simd" attribute as well. Update error message.
708
1d899da2
TS
7092015-11-14 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
710
711 * c-parser.c (c_parser_omp_declare_target): Adjust.
712
e4606348
JJ
7132015-11-14 Jakub Jelinek <jakub@redhat.com>
714
715 * c-typeck.c (c_finish_omp_clauses): Don't mark
716 GOMP_MAP_FIRSTPRIVATE_POINTER decls addressable.
717
3e636daf
MP
7182015-11-14 Marek Polacek <polacek@redhat.com>
719
720 * c-decl.c: Use RECORD_OR_UNION_TYPE_P throughout.
721 * c-typeck.c: Likewise.
722
ebedc9a3
DM
7232015-11-13 David Malcolm <dmalcolm@redhat.com>
724
725 * c-decl.c (warn_defaults_to): Pass line_table to
726 rich_location ctor.
727 * c-errors.c (pedwarn_c99): Likewise.
728 (pedwarn_c90): Likewise.
729 * c-parser.c (set_c_expr_source_range): New functions.
730 (c_token::get_range): New method.
731 (c_token::get_finish): New method.
732 (c_parser_expr_no_commas): Call set_c_expr_source_range on the ret
733 based on the range from the start of the LHS to the end of the
734 RHS.
735 (c_parser_conditional_expression): Likewise, based on the range
736 from the start of the cond.value to the end of exp2.value.
737 (c_parser_binary_expression): Call set_c_expr_source_range on
738 the stack values for TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR.
739 (c_parser_cast_expression): Call set_c_expr_source_range on ret
740 based on the cast_loc through to the end of the expr.
741 (c_parser_unary_expression): Likewise, based on the
742 op_loc through to the end of op.
743 (c_parser_sizeof_expression) Likewise, based on the start of the
744 sizeof token through to either the closing paren or the end of
745 expr.
746 (c_parser_postfix_expression): Likewise, using the token range,
747 or from the open paren through to the close paren for
748 parenthesized expressions.
749 (c_parser_postfix_expression_after_primary): Likewise, for
750 various kinds of expression.
751 * c-tree.h (struct c_expr): Add field "src_range".
752 (c_expr::get_start): New method.
753 (c_expr::get_finish): New method.
754 (set_c_expr_source_range): New decls.
755 * c-typeck.c (parser_build_unary_op): Call set_c_expr_source_range
756 on ret for prefix unary ops.
757 (parser_build_binary_op): Likewise, running from the start of
758 arg1.value through to the end of arg2.value.
759
ec8b536f
MP
7602015-11-13 Marek Polacek <polacek@redhat.com>
761
762 PR c/68320
763 * c-parser.c (c_parser_for_statement): Treat unknown tokens as IDs.
764
277fe616
DM
7652015-11-13 David Malcolm <dmalcolm@redhat.com>
766
767 * c-typeck.c: Include spellcheck.h.
768 (lookup_field_fuzzy_find_candidates): New function.
769 (lookup_field_fuzzy): New function.
770 (build_component_ref): If the field was not found, try using
771 lookup_field_fuzzy and potentially offer a suggestion.
772
6e232ba4
JN
7732015-11-12 James Norris <jnorris@codesourcery.com>
774 Joseph Myers <joseph@codesourcery.com>
775
776 * c-parser.c (c_parser_pragma): Handle PRAGMA_OACC_DECLARE.
777 (c_parser_omp_clause_name): Handle 'device_resident' clause.
778 (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
779 and PRAGMA_OMP_CLAUSE_LINK.
780 (c_parser_oacc_all_clauses): Handle PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT
781 and PRAGMA_OACC_CLAUSE_LINK.
782 (OACC_DECLARE_CLAUSE_MASK): New definition.
783 (c_parser_oacc_declare): New function.
784
9be4f715
MP
7852015-11-12 Marek Polacek <polacek@redhat.com>
786
787 PR c/67784
788 * c-parser.c (c_parser_for_statement): Reclassify the token in
789 a correct scope.
790
e78bede6
MP
7912015-11-11 Marek Polacek <polacek@redhat.com>
792
793 PR c/68107
794 PR c++/68266
795 * c-decl.c (grokdeclarator): Call valid_array_size_p. Remove code
796 checking the size of an array.
797
69f293c9
AM
7982015-11-11 Andrew MacLeod <amacleod@redhat.com>
799
800 * c-array-notation.c: Remove unused header files.
801 * c-aux-info.c: Likewise.
802 * c-convert.c: Likewise.
803 * c-decl.c: Likewise.
804 * c-errors.c: Likewise.
805 * c-lang.c: Likewise.
806 * c-objc-common.c: Likewise.
807 * c-parser.c: Likewise.
808 * c-typeck.c: Likewise.
809 * gccspec.c: Likewise.
810
3a40d81d
NS
8112015-11-09 Thomas Schwinge <thomas@codesourcery.com>
812 Cesar Philippidis <cesar@codesourcery.com>
813 James Norris <jnorris@codesourcery.com>
814 Julian Brown <julian@codesourcery.com>
815 Nathan Sidwell <nathan@codesourcery.com>
816
817 c/
818 * c-parser.c (c_parser_declaration_or_fndef): Add OpenACC
819 routine arg.
820 (c_parser_declaration_or_fndef): Call c_finish_oacc_routine.
821 (c_parser_pragma): Parse 'acc routine'.
822 (OACC_ROUTINE_CLAUSE_MARK): Define.
823 (c_parser_oacc_routine, (c_finish_oacc_routine): New.
824
fc402eec
AA
8252015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
826
827 PR debug/67192
828 * c-typeck.c (c_finish_loop): For unconditional loops, set the
829 location of the backward-goto to the start of the loop body.
830
f6b0b3db
AA
8312015-11-09 Andreas Arnez <arnez@linux.vnet.ibm.com>
832
833 PR debug/67192
834 * c-parser.c (c_parser_while_statement): Finish the loop before
835 parsing ahead for misleading indentation.
836 (c_parser_for_statement): Likewise.
837
ee45a32d
EB
8382015-11-08 Eric Botcazou <ebotcazou@adacore.com>
839
840 * c-decl.c (finish_struct): If the structure has reverse storage
841 order, rewrite the type of array fields with scalar component. Call
842 maybe_apply_pragma_scalar_storage_order on entry.
843 * c-typeck.c (build_unary_op) <ADDR_EXPR>: Remove left-overs. Issue
844 errors on bit-fields and reverse SSO here and not...
845 (c_mark_addressable): ...here.
846 (output_init_element): Adjust call to initializer_constant_valid_p.
847 (c_build_qualified_type): Propagate TYPE_REVERSE_STORAGE_ORDER.
848
8a645150
DM
8492015-11-06 David Malcolm <dmalcolm@redhat.com>
850
851 * c-decl.c (warn_defaults_to): Update for change in signature
852 of diagnostic_set_info.
853 * c-errors.c (pedwarn_c99): Likewise.
854 (pedwarn_c90): Likewise.
855 * c-objc-common.c (c_tree_printer): Update for new "caret_p" param
856 for textinfo::set_location.
857
7a5e4956
CP
8582015-11-05 Cesar Philippidis <cesar@codesourcery.com>
859 Thomas Schwinge <thomas@codesourcery.com>
860 James Norris <jnorris@codesourcery.com>
861
862 * c-parser.c (c_parser_omp_clause_name): Add support for
863 PRAGMA_OACC_CLAUSE_INDEPENDENT and PRAGMA_OACC_CLAUSE_TILE.
864 (c_parser_omp_clause_default): Add is_oacc argument. Handle
865 default(none) in OpenACC.
866 (c_parser_oacc_shape_clause): Allow pointer variables as gang static
867 arguments.
868 (c_parser_oacc_clause_tile): New function.
869 (c_parser_oacc_all_clauses): Add support for OMP_CLAUSE_DEFAULT,
870 OMP_CLAUSE_INDEPENDENT and OMP_CLAUSE_TILE.
871 (OACC_LOOP_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_{PRIVATE,INDEPENDENT,
872 TILE}.
873 (OACC_KERNELS_MASK): Add PRAGMA_OACC_CLAUSE_DEFAULT.
874 (OACC_PARALLEL_MASK): Add PRAGMA_OACC_CLAUSE_{DEFAULT,PRIVATE,
875 FIRSTPRIVATE}.
876 (c_parser_omp_all_clauses): Update call to c_parser_omp_clause_default.
877 (c_parser_oacc_update): Update the error message for missing clauses.
878 * c-typeck.c (c_finish_omp_clauses): Add support for OMP_CLAUSE_TILE
879 and OMP_CLAUSE_INDEPENDENT.
880
bfcfbfa0
MP
8812015-11-05 Marek Polacek <polacek@redhat.com>
882
883 PR c/68090
884 * c-parser.c (c_parser_postfix_expression_after_paren_type): Don't
885 deal with pre-evaluation on invalid types.
886
e01d41e5
JJ
8872015-11-05 Jakub Jelinek <jakub@redhat.com>
888 Ilya Verbin <ilya.verbin@intel.com>
889
890 * c-parser.c: Include context.h and gimple-expr.h.
891 (c_parser_omp_clause_schedule): Parse schedule modifiers, diagnose
892 monotonic together with nonmonotonic.
893 (c_parser_omp_for_loop): Call c_omp_check_loop_iv. Call add_stmt here.
894 (OMP_DISTRIBUTE_CLAUSE_MASK): Add lastprivate clause.
895 (c_parser_omp_target_data, c_parser_omp_target_enter_data,
896 c_parser_omp_target_exit_data): Allow GOMP_MAP_ALWAYS_POINTER.
897 (c_parser_omp_target): Likewise. Evaluate num_teams and thread_limit
898 expressions on combined target teams before the target.
899 (c_parser_omp_declare_target): If decl has "omp declare target" or
900 "omp declare target link" attribute, and cgraph or varpool node already
901 exists, then set corresponding flags. Call c_finish_omp_clauses
902 in the parenthesized extended-list syntax case.
903 * c-decl.c (c_decl_attributes): Don't diagnose block scope vars inside
904 declare target.
905 * c-typeck.c (handle_omp_array_sections_1): Allow non-zero low-bound
906 on OMP_CLAUSE_REDUCTION array sections.
907 (handle_omp_array_sections): Encode low-bound into the MEM_REF, either
908 into the constant offset, or for variable low-bound using
909 POINTER_PLUS_EXPR. For structure element based array sections use
910 GOMP_MAP_ALWAYS_POINTER instead of GOMP_MAP_FIRSTPRIVATE_POINTER.
911 (c_finish_omp_clauses): Drop generic_field_head, structure
912 elements are now always mapped even as array section bases,
913 diagnose same var in data sharing and mapping clauses. Diagnose if
914 linear step on declare simd is neither a constant nor a uniform
915 parameter. Look through POINTER_PLUS_EXPR for array section
916 reductions. Diagnose the same var or function appearing multiple
917 times on the same directive. Fix up wording for the to clause if t
918 is neither a FUNCTION_DECL nor a VAR_DECL. Diagnose nonmonotonic
919 modifier on kinds other than dynamic or guided or nonmonotonic
920 modifier together with ordered clause.
921
4bf9e5a8
TS
9222015-11-03 Thomas Schwinge <thomas@codesourcery.com>
923 Chung-Lin Tang <cltang@codesourcery.com>
924
925 * c-parser.c (c_parser_omp_construct): Handle PRAGMA_OACC_ATOMIC.
926
2adfab87
AM
9272015-10-29 Andrew MacLeod <amacleod@redhat.com>
928
929 * c-array-notation.c: Reorder #include's and remove duplicates.
930 * c-aux-info.c: Likewise.
931 * c-convert.c: Likewise.
932 * c-decl.c: Likewise.
933 * c-errors.c: Likewise.
934 * c-lang.c: Likewise.
935 * c-objc-common.c: Likewise.
936 * c-parser.c: Likewise.
937 * c-typeck.c: Likewise.
938
e922069e
JW
9392015-10-26 Jim Wilson <jim.wilson@linaro.org>
940
941 PR debug/66068
942 * c-typeck.c (c_build_qualified_type): Clear C_TYPE_INCOMPLETE_VARS
943 after calling build_qualified_type.
944
765dd391
CP
9452015-10-27 Cesar Philippidis <cesar@codesourcery.com>
946 Thomas Schwinge <thomas@codesourcery.com>
947 James Norris <jnorris@codesourcery.com>
948 Joseph Myers <joseph@codesourcery.com>
949 Julian Brown <julian@codesourcery.com>
950 Bernd Schmidt <bschmidt@redhat.com>
951
952 * c-parser.c (c_parser_oacc_shape_clause): New.
953 (c_parser_oacc_simple_clause): New.
954 (c_parser_oacc_all_clauses): Add auto, gang, seq, vector, worker.
955 (OACC_LOOP_CLAUSE_MASK): Add gang, worker, vector, auto, seq.
956
88bae6f4
TS
9572015-10-27 Thomas Schwinge <thomas@codesourcery.com>
958 James Norris <jnorris@codesourcery.com>
959 Cesar Philippidis <cesar@codesourcery.com>
960
961 PR c/64765
962 PR c/64880
963 * c-parser.c (c_parser_oacc_loop): Add mask, cclauses formal
964 parameters, and handle these. Adjust all users.
965 (c_parser_oacc_kernels, c_parser_oacc_parallel): Merge functions
966 into...
967 (c_parser_oacc_kernels_parallel): ... this new function. Adjust
968 all users.
969 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels): Don't
970 declare functions.
971 (c_finish_omp_construct): Declare function.
972 * c-typeck.c (c_finish_oacc_parallel, c_finish_oacc_kernels):
973 Merge functions into...
974 (c_finish_omp_construct): ... this new function.
975
a8fc2579
RB
9762015-10-22 Richard Biener <rguenther@suse.de>
977
978 * c-typeck.c (c_finish_omp_clauses): Properly convert operands
979 before folding a MINUS_EXPR.
980
e9122ef6
MP
9812015-10-21 Marek Polacek <polacek@redhat.com>
982
983 PR c/68024
984 * c-decl.c (start_function): Warn about vararg functions without
985 a prototype.
986
9f47c7e5
IE
9872015-10-21 Ilya Enkovich <enkovich.gnu@gmail.com>
988
989 * c-typeck.c (build_conditional_expr): Use boolean vector
990 type for vector comparison.
991 (build_vec_cmp): New.
992 (build_binary_op): Use build_vec_cmp for comparison.
993
fa60eeb9
MP
9942015-10-20 Marek Polacek <polacek@redhat.com>
995
996 * c-parser.c (is_cilkplus_vector_p): Don't define here.
997
2c7020eb
MP
9982015-10-20 Marek Polacek <polacek@redhat.com>
999
1000 PR c/67964
1001 * c-parser.c (c_parser_attributes): Break out of the loop if the
1002 token after an attribute isn't a comma.
1003
d9a6bd32
JJ
10042015-10-13 Jakub Jelinek <jakub@redhat.com>
1005 Aldy Hernandez <aldyh@redhat.com>
1006
1007 * c-parser.c (c_parser_pragma): Handle PRAGMA_OMP_ORDERED here.
1008 (c_parser_omp_clause_name): Handle OpenMP 4.5 clauses.
1009 (c_parser_omp_variable_list): Handle structure elements for
1010 map, to and from clauses. Handle array sections in reduction
1011 clause. Formatting fixes.
1012 (c_parser_omp_clause_if): Add IS_OMP argument, handle parsing of
1013 if clause modifiers.
1014 (c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
1015 c_parser_omp_clause_priority, c_parser_omp_clause_hint,
1016 c_parser_omp_clause_defaultmap, c_parser_omp_clause_use_device_ptr,
1017 c_parser_omp_clause_is_device_ptr): New functions.
1018 (c_parser_omp_clause_ordered): Parse optional parameter.
1019 (c_parser_omp_clause_reduction): Handle array reductions.
1020 (c_parser_omp_clause_schedule): Parse optional simd modifier.
1021 (c_parser_omp_clause_nogroup, c_parser_omp_clause_orderedkind): New
1022 functions.
1023 (c_parser_omp_clause_linear): Parse linear clause modifiers.
1024 (c_parser_omp_clause_depend_sink): New function.
1025 (c_parser_omp_clause_depend): Parse source/sink depend kinds.
1026 (c_parser_omp_clause_map): Parse release/delete map kinds and
1027 optional always modifier.
1028 (c_parser_oacc_all_clauses): Adjust c_parser_omp_clause_if
1029 and c_finish_omp_clauses callers.
1030 (c_parser_omp_all_clauses): Likewise. Parse OpenMP 4.5 clauses.
1031 Parse "to" as OMP_CLAUSE_TO_DECLARE if on declare target directive.
1032 (c_parser_oacc_cache): Adjust c_finish_omp_clauses caller.
1033 (OMP_CRITICAL_CLAUSE_MASK): Define.
1034 (c_parser_omp_critical): Parse critical clauses.
1035 (c_parser_omp_for_loop): Handle doacross loops, adjust
1036 c_finish_omp_for and c_finish_omp_clauses callers.
1037 (OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
1038 (c_parser_omp_simd): Allow ordered clause if it has no parameter.
1039 (OMP_FOR_CLAUSE_MASK): Add linear clause.
1040 (c_parser_omp_for): Disallow ordered clause when combined with
1041 distribute. Disallow linear clause when combined with distribute
1042 and not combined with simd.
1043 (OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
1044 (c_parser_omp_ordered): Add CONTEXT argument, remove LOC argument,
1045 parse clauses and if depend clause is found, don't parse a body.
1046 (c_parser_omp_parallel): Disallow copyin clause on target parallel.
1047 Allow target parallel without for after it.
1048 (OMP_TASK_CLAUSE_MASK): Add priority clause.
1049 (OMP_TARGET_DATA_CLAUSE_MASK): Add use_device_ptr clause.
1050 (c_parser_omp_target_data): Diagnose no map clauses or clauses with
1051 invalid kinds.
1052 (OMP_TARGET_UPDATE_CLAUSE_MASK): Add depend and nowait clauses.
1053 (OMP_TARGET_ENTER_DATA_CLAUSE_MASK,
1054 OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
1055 (c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): New
1056 functions.
1057 (OMP_TARGET_CLAUSE_MASK): Add depend, nowait, private, firstprivate,
1058 defaultmap and is_device_ptr clauses.
1059 (c_parser_omp_target): Parse target parallel and target simd. Set
1060 OMP_TARGET_COMBINED on combined constructs. Parse target enter data
1061 and target exit data. Diagnose invalid map kinds.
1062 (OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
1063 (c_parser_omp_declare_target): Parse OpenMP 4.5 forms of this
1064 construct.
1065 (c_parser_omp_declare_reduction): Use STRIP_NOPS when checking for
1066 &omp_priv.
1067 (OMP_TASKLOOP_CLAUSE_MASK): Define.
1068 (c_parser_omp_taskloop): New function.
1069 (c_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here,
1070 handle PRAGMA_OMP_TASKLOOP.
1071 (c_parser_cilk_for): Adjust c_finish_omp_clauses callers.
1072 * c-tree.h (c_finish_omp_clauses): Add two new arguments.
1073 * c-typeck.c (handle_omp_array_sections_1): Fix comment typo.
1074 Add IS_OMP argument, handle structure element bases, diagnose
1075 bitfields, pass IS_OMP recursively, diagnose known zero length
1076 array sections in depend clauses, handle array sections in reduction
1077 clause, diagnose negative length even for pointers.
1078 (handle_omp_array_sections): Add IS_OMP argument, use auto_vec for
1079 types, pass IS_OMP down to handle_omp_array_sections_1, handle
1080 array sections in reduction clause, set
1081 OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if map could be zero
1082 length array section, use GOMP_MAP_FIRSTPRIVATE_POINTER for IS_OMP.
1083 (c_finish_omp_clauses): Add IS_OMP and DECLARE_SIMD arguments.
1084 Handle new OpenMP 4.5 clauses and new restrictions for the old ones.
1085
21ba0cea
MP
10862015-10-06 Marek Polacek <polacek@redhat.com>
1087
1088 * c-parser.c (c_parser_statement_after_labels): Use
1089 protected_set_expr_location.
1090 (c_parser_omp_clause_num_gangs): Likewise.
1091 (c_parser_omp_clause_num_threads): Likewise.
1092 (c_parser_omp_clause_num_workers): Likewise.
1093 (c_parser_omp_clause_vector_length): Likewise.
1094 (c_parser_omp_clause_num_teams): Likewise.
1095 (c_parser_omp_clause_thread_limit): Likewise.
1096 * c-typeck.c (build_c_cast): Likewise.
1097 (c_cast_expr): Likewise.
1098
624d31fe
RS
10992015-10-05 Richard Sandiford <richard.sandiford@arm.com>
1100
1101 * c-typeck.c (c_tree_equal): Use real_equal instead of
1102 REAL_VALUES_EQUAL.
1103
b8fd7909
JM
11042015-10-04 Jason Merrill <jason@redhat.com>
1105
1106 * c-parser.c (c_lex_one_token): Handle @synchronized.
1107 * c-decl.c (match_builtin_function_types): A declaration of a built-in
1108 can change whether the function is transaction_safe.
1109
1c7485af
MP
11102015-10-02 Marek Polacek <polacek@redhat.com>
1111
1112 PR c/67730
1113 * c-typeck.c (convert_for_assignment): Use the expansion point
1114 location throughout.
1115
3e3b8d63
MP
11162015-10-02 Marek Polacek <polacek@redhat.com>
1117
1118 PR c/64249
1119 * c-parser.c (c_parser_statement_after_labels): Add CHAIN parameter
1120 and pass it down to c_parser_if_statement.
1121 (c_parser_else_body): Add CHAIN parameter and pass it down to
1122 c_parser_statement_after_labels.
1123 (c_parser_if_statement): Add CHAIN parameter. Add code to warn about
1124 duplicated if-else-if conditions.
1125
aabef2de
MP
11262015-10-01 Marek Polacek <polacek@redhat.com>
1127
1128 * c-typeck.c (convert_for_assignment): Improve commentary.
1129
de8ddd5f
MP
11302015-09-30 Marek Polacek <polacek@redhat.com>
1131
1132 PR c/67730
1133 * c-typeck.c (c_finish_return): Use the expansion point location for
1134 certain "return with value" warnings.
1135
c4914de6
MLI
11362015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1137
1138 * c-parser.c (pragma_lex): Add loc argument.
1139
0e36f5c7
MP
11402015-09-15 Marek Polacek <polacek@redhat.com>
1141
1142 PR c/67580
1143 * c-decl.c (tag_exists_p): New function.
1144 * c-parser.c (c_parser_declaration_or_fndef): Give a hint when
1145 struct/union/enum keywords are missing.
1146 * c-tree.h (tag_exists_p): Declare.
1147
2f3bb934
MP
11482015-09-15 Marek Polacek <polacek@redhat.com>
1149
1150 * c-decl.c (lookup_label): Return NULL_TREE instead of 0.
1151 (lookup_tag): Change the type of THISLEVEL_ONLY to bool.
1152 Return NULL_TREE instead of 0.
1153 (lookup_name): Return NULL_TREE instead of 0.
1154 (lookup_name_in_scope): Likewise.
1155 (shadow_tag_warned): Use true instead of 1 and NULL_TREE instead of 0.
1156 (parser_xref_tag): Use false instead of 0.
1157 (start_struct): Use true instead of 1.
1158 (start_enum): Use true instead of 1 and NULL_TREE instead of 0.
1159
aa256c4a
MP
11602015-09-14 Marek Polacek <polacek@redhat.com>
1161
1162 * c-typeck.c (set_nonincremental_init_from_string): Use
1163 HOST_WIDE_INT_M1U when shifting a negative value.
1164
dbb68221
MW
11652015-09-09 Mark Wielaard <mjw@redhat.com>
1166
1167 * c-typeck.c (build_binary_op): Check and warn when nonnull arg
1168 parm against NULL.
1169
a8a098ac
JJ
11702015-09-10 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR c/67502
1173 * c-parser.c (c_parser_omp_for_loop): Emit DECL_EXPR stmts
1174 into OMP_FOR_PRE_BODY rather than before the loop.
1175
f4b189d5
JJ
11762015-09-09 Jakub Jelinek <jakub@redhat.com>
1177
0bb99c11
JJ
1178 PR c/67501
1179 * c-parser.c (c_parser_oacc_all_clauses,
1180 c_parser_omp_all_clauses): Remove invalid clause from
1181 list of clauses even if parser->error is set.
1182
fce5e5e3
JJ
1183 PR c/67500
1184 * c-parser.c (c_parser_omp_clause_aligned,
1185 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen): Fix up
1186 test for errors.
1187 * c-decl.c (temp_pop_parm_decls): Allow b->decl equal to
1188 error_mark_node.
1189
f4b189d5
JJ
1190 PR c/67495
1191 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
1192 instead of c_parser_unary_expression. If the result is !lvalue_p,
1193 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
1194
b2aaf235
MP
11952015-09-04 Marek Polacek <polacek@redhat.com>
1196
1197 PR sanitizer/67279
1198 * c-typeck.c (build_binary_op): Don't instrument static initializers.
1199
1807ffc1
MS
12002015-09-03 Martin Sebor <msebor@redhat.com>
1201
1202 PR c/66516
8b652e65
JJ
1203 * c-typeck.c (convert_arguments, parser_build_unary_op,
1204 build_conditional_expr, c_cast_expr, convert_for_assignment,
1205 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
1206 reject_gcc_builtin.
1207 (c_decl_implicit): Define.
1208
d04ff417
MP
12092015-09-02 Marek Polacek <polacek@redhat.com>
1210
1211 PR c/67432
1212 * c-parser.c (c_parser_enum_specifier): Give a better error for
1213 an empty enum.
1214
a79683d5
TS
12152015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1216
1217 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
1218
191a6b94
MP
12192015-08-12 Marek Polacek <polacek@redhat.com>
1220
1221 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
1222 LOC to it.
1223
420a9d9b
MP
12242015-08-03 Marek Polacek <polacek@redhat.com>
1225
1226 PR c/67088
1227 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
1228 Use it.
1229 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
1230
992118a1
PP
12312015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
1232
1233 * c-parser.c (c_parser_if_body): Take token_indent_info
1234 argument. Call warn_for_misleading_indentation even when the
1235 body is a semicolon. Extract token_indent_infos corresponding
1236 to the guard, body and next tokens. Adjust call to
1237 warn_for_misleading_indentation accordingly.
1238 (c_parser_else_body): Likewise.
1239 (c_parser_if_statement): Likewise.
1240 (c_parser_while_statement): Likewise.
1241 (c_parser_for_statement): Likewise.
1242
46308474
LFSM
12432015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
1244 Manuel López-Ibáñez <manu@gcc.gnu.org>
1245
1246 * c-decl.c (get_parm_info): Remove static var. Update warning
1247 message.
1248
05b28fd6
MP
12492015-07-27 Marek Polacek <polacek@redhat.com>
1250
1251 PR c++/66555
1252 PR c/54979
1253 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
1254
451b5e48
MP
12552015-07-20 Marek Polacek <polacek@redhat.com>
1256
1257 PR c++/55095
1258 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
1259 (build_binary_op): Warn about left shift overflows.
1260
1916bcb5
AM
12612015-07-09 Andrew MacLeod <amacleod@redhat.com>
1262
1263 * c-array-notation.c: Adjust includes for flags.h changes.
1264 * c-objc-common.c: Likewise.
1265
c7131fb2
AM
12662015-07-07 Andrew MacLeod <amacleod@redhat.com>
1267
1268 * c-array-notation.c: Adjust includes.
1269 * c-aux-info.c: Likewise.
1270 * c-convert.c: Likewise.
1271 * c-decl.c: Likewise.
1272 * c-errors.c: Likewise.
1273 * c-lang.c: Likewise.
1274 * c-objc-common.c: Likewise.
1275 * c-parser.c: Likewise.
1276 * c-typeck.c: Likewise.
1277
da2e71c9
MLI
12782015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1279
1280 PR fortran/66605
1281 * c-decl.c (finish_function): Call do_warn_unused_parameter.
1282
b155cfd9
MP
12832015-06-29 Marek Polacek <polacek@redhat.com>
1284
1285 PR c/66322
1286 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
1287 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
1288 about -Wswitch-bool here.
1289 (do_case): Update c_add_case_label call.
1290 (c_finish_case): Update c_do_switch_warnings call.
1291
31521951
MP
12922015-06-27 Marek Polacek <polacek@redhat.com>
1293
1294 * c-typeck.c: Use VECTOR_TYPE_P throughout.
1295
22d03525
MP
12962015-06-26 Marek Polacek <polacek@redhat.com>
1297
1298 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1299 INDIRECT_REF_P.
1300 * c-typeck.c (array_to_pointer_conversion): Likewise.
1301 (build_unary_op): Likewise.
1302 (c_finish_return): Likewise.
1303
f0889939
AM
13042015-06-25 Andrew MacLeod <amacleod@redhat.com>
1305
1306 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
1307 * c-parser.c: Likewise.
1308
8d67ee55
RS
13092015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1310
1311 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
1312 instead of pointer_hash.
1313 (detect_field_duplicates): Likewise.
1314
0ae9bd27
MP
13152015-06-25 Marek Polacek <polacek@redhat.com>
1316
1317 * c-array-notation.c: Use VAR_P throughout.
1318 * c-decl.c: Likewise.
1319 * c-objc-common.c: Likewise.
1320 * c-parser.c: Likewise.
1321 * c-typeck.c: Likewise.
1322
62f9079a
MP
13232015-06-25 Marek Polacek <polacek@redhat.com>
1324
1325 * c-decl.c: Use is_global_var throughout.
1326 * c-parser.c: Likewise.
1327 * c-typeck.c: Likewise.
1328
abb226c9
AM
13292015-06-17 Andrew MacLeod <amacleod@redhat.com>
1330
1331 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
1332 * c-aux-info.c: Likewise.
1333 * c-convert.c: Likewise.
1334 * c-decl.c: Likewise.
1335 * c-errors.c: Likewise.
1336 * c-lang.c: Likewise.
1337 * c-objc-common.c: Likewise.
1338 * c-parser.c: Likewise.
1339 * c-typeck.c: Likewise.
1340
8cbababc
JH
13412015-06-11 Jan Hubicka <hubicka@ucw.cz>
1342
1343 PR middle-end/66325
1344 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
1345 variants.
1346
a0349665
PMR
13472015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1348
1349 * c-decl.c (pop_scope): Register the main translation unit
1350 through the new debug hook.
1351
13fdf2e2
AM
13522015-06-08 Andrew MacLeod <amacleod@redhat.com>
1353
1354 * c-array-notation.c : Adjust include files.
1355 * c-aux-info.c : Likewise.
1356 * c-convert.c : Likewise.
1357 * c-decl.c : Likewise.
1358 * c-errors.c : Likewise.
1359 * c-lang.c : Likewise.
1360 * c-lang.h : Likewise.
1361 * c-objc-common.c : Likewise.
1362 * c-parser.c : Likewise.
1363 * c-typeck.c : Likewise.
1364
d7438551
AH
13652015-06-05 Aldy Hernandez <aldyh@redhat.com>
1366
1367 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
1368 immediately clobber it.
1369 (c_write_global_declarations_1): Remove call to
1370 check_global_declaration_1.
1371 (c_write_global_declarations_2): Remove.
1372 (c_write_final_cleanups): Rename from c_write_global_declarations.
1373 Remove call to finalize_compilation_unit.
1374 Remove calls to debugging hooks.
1375 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
1376 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
1377 * c-tree.h: Remove c_write_global_declarations.
1378
ecb9f223
AM
13792015-06-04 Andrew MacLeod <amacleod@redhat.com>
1380
1381 * c-array-notation.c: Adjust includes for restructured coretypes.h.
1382 * c-aux-info.c: Likewise.
1383 * c-convert.c: Likewise.
1384 * c-decl.c: Likewise.
1385 * c-errors.c: Likewise.
1386 * c-lang.c: Likewise.
1387 * c-objc-common.c: Likewise.
1388 * c-parser.c: Likewise.
1389 * c-typeck.c: Likewise.
1390
9482b620
MP
13912015-06-04 Marek Polacek <polacek@redhat.com>
1392
1393 PR c/66341
1394 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
1395 it is a lvalue.
1396
bc51ace3
PK
13972015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1398
1399 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
1400 Warn for empty struct.
1401 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
1402
ea5b45b6
AT
14032015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
1404
1405 * c-decl.c (start_function): Call plugin before parsing.
1406 (finish_function): Call plugin after parsing.
1407
c2d47482
PK
14082015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1409
1410 PR c/49551
1411 * c-decl.c (merge_decls): Merge DECL_COMMON.
1412
a95492ab
JW
14132015-05-22 Jim Wilson <jim.wilson@linaro.org>
1414
1415 * Make-lang.in (check_gcc_pallelize): Define.
1416
fd5c817a
MP
14172015-05-22 Marek Polacek <polacek@redhat.com>
1418
1419 PR c/47043
1420 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
1421 attributes.
1422
c7b70a3c
MP
14232015-05-21 Marek Polacek <polacek@redhat.com>
1424
1425 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
1426 DECL_BUILT_IN.
1427
21b634ae
MP
14282015-05-20 Marek Polacek <polacek@redhat.com>
1429
1430 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
1431 * c-typeck.c: Likewise.
1432
296a8c2f
MP
14332015-05-19 Marek Polacek <polacek@redhat.com>
1434
1435 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
1436
41b37d5e
JJ
14372015-05-19 Jakub Jelinek <jakub@redhat.com>
1438
1439 PR middle-end/66199
1440 * c-parser.c (c_parser_omp_for_loop): Don't add
1441 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
1442 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
1443 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
1444 constructs.
1445
fab27f52
MM
14462015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1447
1448 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 1449 swaps.
fab27f52 1450
40de31cf
MLI
14512015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1452
1453 PR fortran/44054
1454 * c-objc-common.c (c_tree_printer): Replace locus pointer with
1455 accessor function.
1456
3aa3c9fc
MP
14572015-05-14 Marek Polacek <polacek@redhat.com>
1458
1459 PR c/66066
1460 PR c/66127
1461 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
1462 rather than with 0.
1463
c3388e62
DM
14642015-05-12 David Malcolm <dmalcolm@redhat.com>
1465
1466 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
1467 to add a call to warn_for_misleading_indentation.
1468 (c_parser_else_body): Likewise, adding param "else_loc".
1469 (c_parser_if_statement): Check for misleading indentation.
1470 (c_parser_while_statement): Likewise.
1471 (c_parser_for_statement): Likewise.
1472
755e528f
MP
14732015-05-08 Marek Polacek <polacek@redhat.com>
1474
1475 PR c/64918
1476 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
1477 (output_init_element): Likewise.
1478
0173bd2a
MP
14792015-05-07 Marek Polacek <polacek@redhat.com>
1480
1481 PR c/65179
1482 * c-typeck.c (build_binary_op): Warn when left shifting a negative
1483 value.
1484
9babc352
MP
14852015-04-30 Marek Polacek <polacek@redhat.com>
1486
1487 * c-typeck.c (set_init_label): Call error_at instead of error and
1488 pass LOC to it.
1489
ac9f18db
MP
1490 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
1491 the type of a decl.
1492
ec3fba51
MP
1493 * c-typeck.c (c_build_va_arg): Clarify the error message.
1494
b811915d
TS
14952015-04-29 Thomas Schwinge <thomas@codesourcery.com>
1496
1497 * c-parser.c (c_parser_oacc_enter_exit_data): Use
1498 OMP_STANDALONE_CLAUSES.
1499
f3075008
MP
15002015-04-28 Marek Polacek <polacek@redhat.com>
1501
1502 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
1503
4e81b788
MP
15042015-04-28 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/65901
1507 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
1508
6c1db78e
MP
15092015-04-25 Marek Polacek <polacek@redhat.com>
1510
1511 PR c/52085
1512 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
1513 attribute.
1514
5c4abbb8
MP
15152015-04-23 Marek Polacek <polacek@redhat.com>
1516
1517 PR c/65345
1518 * c-decl.c (set_labels_context_r): New function.
1519 (store_parm_decls): Call it via walk_tree_without_duplicates.
1520 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
1521 instead of create_tmp_var. Build TARGET_EXPR instead of
1522 COMPOUND_EXPR.
1523 (build_atomic_assign): Use create_tmp_var_raw instead of
1524 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
1525
06aca1d5
IV
15262015-04-20 Ilya Verbin <ilya.verbin@intel.com>
1527
1528 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
1529 (c_parser_omp_target_update): Add missed %> to error_at ().
1530
8fba1830
BRF
15312015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
1532
1533 PR target/55143
1534 * c-decl.c (c_default_pointer_mode): Remove definition.
1535 * c-tree.h (c_default_pointer_mode): Remove declaration.
1536
62021f64
TB
15372015-03-27 Tobias Burnus <burnus@net-b.de>
1538
1539 PR c/65586
1540 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
1541 error out.
1542 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
1543 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
1544 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
1545
9b65e171
JJ
15462015-03-19 Jakub Jelinek <jakub@redhat.com>
1547
1548 * c-decl.c (c_decl_attributes): Also add "omp declare target"
1549 attribute for DECL_EXTERNAL VAR_DECLs.
1550
17958621
JJ
15512015-03-11 Jakub Jelinek <jakub@redhat.com>
1552
1553 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
1554 argument.
1555
7ccb1a11
JJ
15562015-03-10 Jakub Jelinek <jakub@redhat.com>
1557
1558 PR c/65120
1559 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
1560 before preparing arguments to warn_logical_not_parentheses.
1561
01177669
JJ
15622015-03-09 Jakub Jelinek <jakub@redhat.com>
1563
1564 PR c/65120
1565 * c-typeck.c (parser_build_binary_op): Don't warn for
1566 !!x == y or !b == y where b is _Bool.
1567
802ac282
MP
15682015-03-09 Marek Polacek <polacek@redhat.com>
1569
1570 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
1571 * c-decl.c (grokdeclarator): Likewise.
1572 * c-typeck.c (build_binary_op): Likewise.
1573
e5165b60
MP
15742015-02-27 Marek Polacek <polacek@redhat.com>
1575
1576 PR c/65228
1577 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
1578
065d214c
MP
15792015-02-14 Marek Polacek <polacek@redhat.com>
1580
1581 PR c/64768
1582 * c-decl.c (grokdeclarator): Set the range of a flexible array member
1583 declared through a typedef name.
1584
e5d9235b
MP
15852015-02-13 Marek Polacek <polacek@redhat.com>
1586
1587 PR c/65050
1588 * c-decl.c (grokdeclarator): Print also the type when giving
1589 the error message about array's incomplete element type.
1590
fa01ffcc
JJ
15912015-02-11 Jakub Jelinek <jakub@redhat.com>
1592
1593 PR c/64824
1594 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
1595 check in the POP macro.
1596
c3e38a03
MP
15972015-02-09 Marek Polacek <polacek@redhat.com>
1598
1599 PR c/64856
1600 * c-typeck.c (process_init_element): Don't always wrap
1601 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
1602 initializing a range of elements.
1603
4886ec8e
JJ
16042015-02-04 Jakub Jelinek <jakub@redhat.com>
1605
1606 PR c/64824
1607 PR c/64868
1608 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
1609
c3e38a03 16102015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
1611
1612 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
1613 processing enum declaration.
1614
7b33f0c8
MP
16152015-01-29 Marek Polacek <polacek@redhat.com>
1616
1617 PR c/64709
1618 * c-typeck.c (pop_init_level): If constructor_elements has
1619 exactly one element with integer_zerop value, set constructor_zeroinit
1620 to 1. Remove braces around warning_init call.
1621
dea63e49
JJ
16222015-01-27 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR c/64766
1625 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
1626 of FUNCTION_DECLs with error_mark_node.
1627
d38f7dce
JJ
16282015-01-26 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR c/64778
1631 * c-typeck.c (convert_arguments): Return -1 if there are
1632 error_args, even if we've diagnosed too many arguments.
1633
cbf5d0e7
RB
16342015-01-21 Richard Biener <rguenther@suse.de>
1635
1636 PR middle-end/64313
1637 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
1638 for builtins the user declared correctly.
1639
41dbbb37
TS
16402015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1641 Bernd Schmidt <bernds@codesourcery.com>
1642 Cesar Philippidis <cesar@codesourcery.com>
1643 James Norris <jnorris@codesourcery.com>
1644 Jakub Jelinek <jakub@redhat.com>
1645 Ilmir Usmanov <i.usmanov@samsung.com>
1646
1647 * c-parser.c: Include "gomp-constants.h".
1648 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
1649 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
1650 Use OMP_CLAUSE_SET_MAP_KIND.
1651 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
1652 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
1653 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
1654 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
1655 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
1656 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
1657 "copyout", "create", "delete", "deviceptr", "gang", "host",
1658 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
1659 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
1660 "present_or_create", "pcreate", "seq", "self", "vector",
1661 "vector_length", "wait", "worker".
1662 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
1663 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
1664 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
1665 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
1666 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
1667 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
1668 (c_parser_oacc_data_clause_deviceptr)
1669 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
1670 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
1671 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
1672 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
1673 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
1674 (c_parser_oacc_parallel, c_parser_oacc_update)
1675 (c_parser_oacc_wait): New functions.
1676 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
1677 (c_finish_oacc_data): New prototypes.
1678 * c-typeck.c: Include "gomp-constants.h".
1679 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
1680 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
1681 OMP_CLAUSE_SET_MAP_KIND.
1682 (c_finish_oacc_parallel, c_finish_oacc_kernels)
1683 (c_finish_oacc_data): New functions.
1684 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
1685 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
1686 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
1687 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
1688 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
1689 GOMP_MAP_FORCE_DEVICEPTR.
1690
adfac8df
JJ
16912015-01-09 Michael Collison <michael.collison@linaro.org>
1692
1693 * c-array-notation.c: Include hash-set.h, machmode.h,
1694 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1695 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
1696 * c-aux-info.c: Ditto.
1697 * c-convert.c: Ditto.
1698 * c-decl.c: Ditto.
1699 * c-errors.c: Ditto.
1700 * c-lang.c: Dittoxs.
1701 * c-objc-common.c: Ditto.
1702 * c-parser.c: Ditto.
1703 * c-typeck.c: Include hash-set.h, machmode.h,
1704 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
1705 fold-const.h, wide-int.h, inchash.h, real.h and
1706 fixed-value.h due to flattening of tree.h.
1707
2cc901dc
MP
17082015-01-07 Marek Polacek <polacek@redhat.com>
1709
1710 PR c/64417
1711 * c-typeck.c (process_init_element): Disallow initialization of
1712 a flexible array member with a string constant if the structure
1713 is in an array.
1714
5624e564
JJ
17152015-01-05 Jakub Jelinek <jakub@redhat.com>
1716
e5341100
JJ
1717 PR sanitizer/64344
1718 * c-typeck.c (convert_for_assignment, c_finish_return): For
1719 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
1720 types also set in_late_binary_op around convert call.
1721 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
1722 to integral type casts, if not in_late_binary_op, pass c_fully_fold
1723 result on expr as last argument to ubsan_instrument_float_cast,
1724 if in_late_binary_op, don't use c_save_expr but save_expr.
1725
5624e564
JJ
1726 Update copyright years.
1727
5bd012f8
MP
17282015-01-05 Marek Polacek <polacek@redhat.com>
1729
1730 PR c/64423
1731 * c-typeck.c (build_array_ref): Pass loc down to
1732 warn_array_subscript_with_type_char.
1733
768952be
MU
17342014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
1735
1736 * c-typeck.c: New behavious for pointers to arrays with qualifiers
1737 (common-pointer-type): For pointers to arrays take qualifiers from
1738 element type.
1739 (build_conditional_expr): Add warnings for lost qualifiers.
1740 (comp-target-types): Allow pointers to arrays with different qualifiers.
1741 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
1742 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
1743 to PEDWARN_FOR_QUALIFIERS.
1744
8f94a8c4
JJ
17452014-12-17 Jakub Jelinek <jakub@redhat.com>
1746
1747 PR sanitizer/64289
1748 * c-convert.c: Include ubsan.h.
1749 (convert): For real -> integral casts and
1750 -fsanitize=float-cast-overflow don't call convert_to_integer, but
1751 instead instrument the float cast directly.
1752
b731b390
JJ
17532014-11-29 Jakub Jelinek <jakub@redhat.com>
1754
1755 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
1756 c_finish_stmt_expr): Remove NULL last argument from
1757 create_tmp_var_raw and create_tmp_var calls.
1758 * c-array-notation.c (fix_builtin_array_notation_fn,
1759 build_array_notation_expr, fix_conditional_array_notations_1,
1760 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
1761
541e35a6
MP
17622014-11-28 Marek Polacek <polacek@redhat.com>
1763
1764 PR c/63862
1765 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
1766 convert the right operand to integer type.
1767
b286be94
MP
17682014-11-25 Marek Polacek <polacek@redhat.com>
1769
1770 PR c/63877
1771 * c-decl.c (start_function): Disable -Wmissing-declarations warning
1772 for inline functions.
1773
aa7da51a
JJ
17742014-11-21 Jakub Jelinek <jakub@redhat.com>
1775
1776 PR target/63764
1777 * c-typeck.c (build_array_ref): Adjust
1778 convert_vector_to_pointer_for_subscript caller. If it returns true,
1779 call non_lvalue_loc on the result.
1780
d876207f
RB
17812014-11-11 Richard Biener <rguenther@suse.de>
1782
1783 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
1784 to true.
1785
e5e44252
AK
17862014-11-10 Andi Kleen <ak@linux.intel.com>
1787
1788 PR c/60804
1789 * c-parser.c (c_parser_statement_after_labels): Call
1790 check_no_cilk.
1791 (c_parser_if_statement): Dito.
1792 (c_parser_switch_statement): Dito.
1793 (c_parser_while_statement): Dito.
1794 (c_parser_do_statement): Dito.
1795 (c_parser_for_statement): Dito.
1796 * c-typeck.c (c_finish_loop): Dito.
1797
13c21655
PC
17982014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
1799
1800 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
1801 OPT_Wshift_count_overflow in the warnings.
1802
2d51fcef
MP
18032014-10-30 Marek Polacek <polacek@redhat.com>
1804
1805 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
1806 print the stripped version as well, if they're not the same.
1807
ef4bddc2
RS
18082014-10-29 Richard Sandiford <richard.sandiford@arm.com>
1809
1810 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
1811 machine_mode.
1812
c582198b
AM
18132014-10-28 Andrew MacLeod <amacleod@redhat.com>
1814
1815 * c-decl.c: Adjust include files.
1816 * c-parser.c: Ditto.
1817
ddc8de03
PM
18182014-10-27 Phil Muldoon <pmuldoon@redhat.com>
1819 Tom Tromey <tromey@redhat.com>
1820
1821 * c-tree.h (enum c_oracle_request): New.
1822 (c_binding_oracle_function): New typedef.
1823 (c_binding_oracle, c_pushtag, c_bind): Declare.
1824 * c-decl.c (c_binding_oracle): New global.
1825 (I_SYMBOL_CHECKED): New macro.
1826 (i_symbol_binding): New function.
1827 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
1828 (I_TAG_CHECKED): New macro.
1829 (i_tag_binding): New function.
1830 (I_TAG_BINDING, I_TAG_DECL): Redefine.
1831 (I_LABEL_CHECKED): New macro.
1832 (i_label_binding): New function.
1833 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
1834 (c_print_identifier): Save and restore c_binding_oracle.
1835 (c_pushtag, c_bind): New functions.
1836
60393bbc
AM
18372014-10-27 Andrew MacLeod <amacleod@redhat.com>
1838
1839 * c-typeck.c: Adjust include files.
1840
d723bb7c
MLI
18412014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
1842
1843 PR c++/53061
1844 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
1845 initialization here...
1846 (c_initialize_diagnostics): ... but here. Set defaults after
1847 building pretty-printer.
1848
1bc5a451
MP
18492014-10-23 Marek Polacek <polacek@redhat.com>
1850
1851 PR c/63626
1852 * c-decl.c (pop_scope): Don't print warning in external_scope.
1853
4435bb92
MP
18542014-10-19 Marek Polacek <polacek@redhat.com>
1855
1856 PR c/63567
1857 * c-typeck.c (output_init_element): Allow initializing objects with
1858 static storage duration with compound literals even in C99 and add
1859 pedwarn for it.
1860
7278465e
MP
18612014-10-17 Marek Polacek <polacek@redhat.com>
1862
1863 PR c/63567
1864 * c-typeck.c (digest_init): Allow initializing objects with static
1865 storage duration with compound literals even in C99 and add pedwarn
1866 for it.
1867
d9b7be2e
MP
18682014-10-17 Marek Polacek <polacek@redhat.com>
1869
1870 PR c/63543
1871 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
1872 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
1873 error multiple times. Print the type.
1874
f406ae1f
MP
18752014-10-17 Marek Polacek <polacek@redhat.com>
1876
1877 PR c/63549
1878 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
1879 type.
1880
92574c7c
MP
18812014-10-17 Marek Polacek <polacek@redhat.com>
1882
1883 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
1884 (start_function): Use OPT_Wimplicit_int instead of 0.
1885 (store_parm_decls_oldstyle): Likewise.
1886
1bc4a978
MT
18872014-10-17 Alan Modra <amodra@gmail.com>
1888
1889 PR middle-end/61848
1890 * c-decl.c (merge_decls): Don't merge section name or tls model
1891 to newdecl symtab node, instead merge to olddecl. Override
1892 existing olddecl section name. Set tls_model for all thread-local
1893 vars, not just OMP thread-private ones. Remove incorrect comment.
1894
83685514
AM
18952014-10-16 Andrew MacLeod <amacleod@redhat.com>
1896
1897 * c-decl.c: Adjust include files.
1898
78a7c317
DD
18992014-10-14 DJ Delorie <dj@redhat.com>
1900
1901 * c-parser.c (c_parse_init): Add RID entries for each __intN.
1902 (c_token_starts_typename): Check all __intN, not just __int128.
1903 (c_token_starts_declspecs): Likewise.
1904 (c_parser_declspecs): Likewise.
1905 (c_parser_attribute_any_word): Likewise.
1906 (c_parser_objc_selector): Likewise.
1907 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
1908 (struct c_declspecs): Add int_n_idx field to record *which* __intN
1909 is specified.
1910 * c-decl.c (declspecs_add_type): Check for all __intN, not just
1911 __int128.
1912 (finish_declspecs): Likewise.
1913
74d98c1e
AB
19142014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
1915
1916 * c-parser.c (c_parser_all_labels): New function to replace
1917 the duplicate code.
1918 (c_parser_statement): Call the new function.
1919
84937de2
MP
19202014-10-09 Marek Polacek <polacek@redhat.com>
1921
1922 PR c/63480
1923 * c-typeck.c (pop_init_level): Don't warn about initializing
1924 with { }.
1925
0382aaa0
MP
19262014-10-07 Marek Polacek <polacek@redhat.com>
1927
1928 PR c/59717
1929 * c-decl.c (header_for_builtin_fn): New function.
1930 (implicitly_declare): Suggest which header to include.
1931
7a0ca710
MP
19322014-10-07 Marek Polacek <polacek@redhat.com>
1933
1934 * c-convert.c (convert): Use error_operand_p.
1935 * c-typeck.c (require_complete_type): Likewise.
1936 (really_atomic_lvalue): Likewise.
1937 (digest_init): Likewise.
1938 (handle_omp_array_sections_1): Likewise.
1939
6bc8a126
MP
19402014-10-03 Marek Polacek <polacek@redhat.com>
1941
1942 PR c/63453
1943 * c-decl.c (pop_scope): Don't warn about "inline function declared
1944 but never defined" for functions marked with gnu_inline attribute.
1945
d90c0a59
JJ
19462014-09-25 Jakub Jelinek <jakub@redhat.com>
1947
1948 PR c++/63249
1949 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
1950 on low_bound and length.
1951
083e891e
MP
19522014-09-24 Marek Polacek <polacek@redhat.com>
1953
1954 PR c/61405
1955 PR c/53874
1956 * c-parser.c: Don't define CPP_KEYWORD.
1957 (c_parser_switch_statement): Pass original type to c_finish_case.
1958 * c-tree.h (c_finish_case): Update declaration.
1959 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
1960 conditionally to c_do_switch_warnings.
1961
8d95fe25
MP
19622014-09-03 Marek Polacek <polacek@redhat.com>
1963
1964 PR c/62024
1965 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
1966 conversions.
1967
9a771876
JJ
19682014-09-02 Jakub Jelinek <jakub@redhat.com>
1969 Balaji V. Iyer <balaji.v.iyer@intel.com>
1970 Igor Zamyatin <igor.zamyatin@intel.com>
1971
1972 * c-parser.c (c_parser_cilk_for): New function.
1973 (c_parser_cilk_grainsize): Likewise.
1974 (c_get_temp_regvar): Likewise.
1975 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
1976 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
1977 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
1978 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
1979 case.
1980
b7679d96
CG
19812014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
1982
1983 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
1984 with using HOST_WIDE_INT without truncation to 'int'
1985
59ea0364
MP
19862014-08-22 Marek Polacek <polacek@redhat.com>
1987
1988 PR c++/62199
1989 * c-typeck.c (parser_build_binary_op): Adjust call to
1990 warn_logical_not_parentheses.
1991
671a475e
IZ
19922014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
1993
1994 PR other/62008
1995 * c-parser.c (c_parser_array_notation): Check for correct
1996 type of an array added.
1997
04159acf
MP
19982014-08-19 Marek Polacek <polacek@redhat.com>
1999
2000 PR c++/62153
2001 * c-typeck.c (build_binary_op): If either operand of a comparison
2002 is a boolean expression, call maybe_warn_bool_compare.
2003
c77935ee
PP
20042014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
2005
2006 PR c/45584
2007 * c-typeck.c (build_c_cast): Do a conversion even when the
2008 TYPE_MAIN_VARIANTs are the same.
2009
35aff4fb
MP
20102014-08-19 Marek Polacek <polacek@redhat.com>
2011
2012 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
2013 pedwarn_c99 instead of pedwarn.
2014 (grokfield): Likewise.
2015 (warn_defaults_to): New function.
2016 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
2017 Unconditionally call pedwarn_c99 instead of pedwarn.
2018 (start_function): Call warn_defaults_to instead of pedwarn_c99.
2019 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
2020 check flag_isoc11 before.
2021 * c-errors.c (pedwarn_c99): Change the return type to bool.
2022 Handle -Wc99-c11-compat.
2023 * c-parser.c (disable_extension_diagnostics): Handle
2024 warn_c99_c11_compat.
2025 (restore_extension_diagnostics): Likewise.
2026 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
2027 instead of pedwarn, don't check flag_isoc11 before.
2028 (c_parser_declspecs): Likewise.
2029 (c_parser_alignas_specifier): Likewise.
2030 (c_parser_alignof_expression): Likewise.
2031 (c_parser_generic_selection): Likewise.
2032 * c-tree.h (pedwarn_c99): Update declaration.
2033 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
2034 of pedwarn_c99.
2035
177cce46
MP
20362014-08-19 Marek Polacek <polacek@redhat.com>
2037
2038 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
2039 to pedwarn_c90.
2040 * c-errors.c: Include "opts.h".
2041 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
2042 * c-parser.c (disable_extension_diagnostics): Handle negative value
2043 of warn_c90_c99_compat, too.
2044 (restore_extension_diagnostics): Likewise.
2045 (c_parser_compound_statement_nostart): Pass
2046 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
2047
6dc99c33
MP
20482014-08-12 Marek Polacek <polacek@redhat.com>
2049
2050 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
2051 Add pedwarn.
2052 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
2053 Likewise.
2054 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
2055
f3bede71
MP
20562014-08-10 Marek Polacek <polacek@redhat.com>
2057
2058 PR c/51849
2059 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
2060 Call pedwarn_c90 instead of pedwarn.
2061 (check_bitfield_type_and_width): Likewise.
2062 (declspecs_add_qual): Likewise.
2063 (declspecs_add_type): Likewise.
2064 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
2065 Adjust to only call pedwarn_c90.
2066 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
2067 pedwarn_c90 instead of pedwarn.
2068 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
2069 * c-parser.c (disable_extension_diagnostics): Handle
2070 warn_c90_c99_compat.
2071 (restore_extension_diagnostics): Likewise.
2072 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
2073 pedwarn_c90 instead of pedwarn.
2074 (c_parser_initelt): Likewise.
2075 (c_parser_postfix_expression): Likewise.
2076 (c_parser_postfix_expression_after_paren_type): Likewise.
2077 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
2078 * c-tree.h: Fix formatting.
2079 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
2080 pedwarn_c90 instead of pedwarn.
2081
9f25a338
TS
20822014-08-07 Trevor Saunders <tsaunders@mozilla.com>
2083
2084 * c-typeck.c: Remove include of pointer-set.h.
2085
044331a8
MP
20862014-08-07 Marek Polacek <polacek@redhat.com>
2087
2088 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
2089
b787e7a2
TS
20902014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2091
2092 * c-typeck.c: Use hash_map instead of pointer_map.
2093
6e2830c3
TS
20942014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2095
2096 * c-decl.c: Use hash_set instead of pointer_set.
2097
a7ee52fb
IZ
20982014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
2099
2100 PR middle-end/61455
2101 * c-array-notation.c (expand_array_notations): Handling
2102 of DECL_EXPR added.
2103
b4dfdc11
MG
21042014-07-31 Marc Glisse <marc.glisse@inria.fr>
2105
2106 PR c++/60517
2107 * c-typeck.c (c_finish_return): Return 0 instead of the address of
2108 a local variable.
2109
976d5a22
TT
21102014-07-30 Tom Tromey <tromey@redhat.com>
2111
2112 * c-typeck.c (struct constructor_stack) <designator_depth>: New
2113 field.
2114 (really_start_incremental_init, push_init_level): Initialize
2115 designator_depth.
2116 (pop_init_level): Set global designator_depth.
2117 (process_init_element): Check for designated_init attribute.
2118
30281de2
MP
21192014-07-20 Marek Polacek <polacek@redhat.com>
2120
2121 PR c/61852
2122 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
2123 (implicitly_declare): Pass location to implicit_decl_warning.
2124
b108f48f
JJ
21252014-07-14 Jakub Jelinek <jakub@redhat.com>
2126
2127 PR middle-end/61294
2128 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
2129 If non-NULL, call c_parser_check_literal_zero.
2130 (c_parser_check_literal_zero): New function.
2131 (c_parser_postfix_expression_after_primary): Adjust
2132 c_parser_expr_list caller, handle -Wmemset-transposed-args.
2133
773ec47f
MP
21342014-07-06 Marek Polacek <polacek@redhat.com>
2135
2136 PR c/6940
2137 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
2138 * c-tree.h (C_ARRAY_PARAMETER): Define.
2139 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
2140 function parameter.
2141
22e1cf1c
JH
21422014-07-02 Jan Hubicka <hubicka@ucw.cz>
2143 Chen Gang <gang.chen.5i5j@gmail.com>
2144
2145 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
2146 releasing symbol.
2147
52ec0ea3
MP
21482014-07-01 Marek Polacek <polacek@redhat.com>
2149
2150 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
2151 instead of 0 to WARN_FOR_ASSIGNMENT.
2152
d5c3d343
MP
21532014-07-01 Marek Polacek <polacek@redhat.com>
2154
2155 PR c/58286
2156 * c-typeck.c (convert_for_assignment): Pass
2157 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
2158
6a7253a4
MP
21592014-06-30 Marek Polacek <polacek@redhat.com>
2160
2161 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
2162 has no_sanitize_undefined attribute.
2163
5e88a8f4
IZ
21642014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
2165
2166 PR middle-end/57541
2167 * c-array-notation.c (fix_builtin_array_notation_fn):
2168 Check for 0 arguments in builtin call. Check that bultin argument is
2169 correct.
2170 * c-parser.c (c_parser_array_notation): Check for incorrect initial
2171 index.
2172
9698b078
SH
21732014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
2174
2175 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
2176 qualifiers in __auto_type for atomic types.
2177 (c_parser_typeof_specifier): Discard all type qualifiers in
2178 __typeof__ for atomic types.
2179
6e07c515
MP
21802014-06-25 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/61162
2183 * c-parser.c (c_parser_statement_after_labels): Pass the location of
2184 the return expression to c_finish_return.
2185
da6f124d
JJ
21862014-06-25 Jakub Jelinek <jakub@redhat.com>
2187
2188 * c-typeck.c (c_finish_omp_clauses): Make sure
2189 OMP_CLAUSE_LINEAR_STEP has correct type.
2190
c203e8a7
TS
21912014-06-24 Trevor Saunders <tsaunders@mozilla.com>
2192
2193 * c-decl.c: Adjust.
2194
56ad0e38
JJ
21952014-06-24 Jakub Jelinek <jakub@redhat.com>
2196
2197 * c-parser.c (c_parser_omp_for_loop): For
2198 #pragma omp parallel for simd move lastprivate clause from parallel
2199 to for rather than simd.
2200
47c2554f
MP
22012014-06-23 Marek Polacek <polacek@redhat.com>
2202
2203 * c-typeck.c (parser_build_binary_op): Don't call
2204 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
2205
56363ffd
JH
22062014-06-15 Jan Hubicka <hubicka@ucw.cz>
2207
2208 * c-parser.c (c_parser_omp_threadprivate): Likewise.
2209 * c-decl.c (merge_decls): Likewise.
2210
d7ff7ae5
MP
22112014-06-09 Marek Polacek <polacek@redhat.com>
2212
2213 PR c/36446
2214 * c-typeck.c (error_init): Call inform instead of error_at.
2215 (pedwarn_init): Call inform instead of pedwarn.
2216 (warning_init): Call inform instead of warning_at.
2217
24d047a3
JH
22182014-06-07 Jan Hubicka <hubicka@ucw.cz>
2219
2220 * c-decl.c (merge_decls): Use set_decl_section_name.
2221 (duplicate_decls): Remove node if it exists.
2222
9bac5cbb
G
22232014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
2224
2225 PR c/53119
2226 * c-typeck.c (push_init_level, process_init_element,
2227 pop_init_level): Correct check for zero initialization, move
2228 missing brace warning to respect zero initialization.
2229
8ffcdea8
MP
22302014-06-05 Marek Polacek <polacek@redhat.com>
2231
2232 PR c/56724
2233 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
2234
742938c9
MP
22352014-06-05 Marek Polacek <polacek@redhat.com>
2236
2237 PR c/49706
2238 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
2239 on the left hand side operand of a comparison.
2240
6447c55d
MP
22412014-06-05 Marek Polacek <polacek@redhat.com>
2242
2243 PR c/48062
2244 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
2245 Print note only if the warning was printed.
2246
9dc7743c
IZ
22472014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
2248
2249 PR c/58942
2250 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
2251 with a pointer.
2252
fedfecef
MP
22532014-06-03 Marek Polacek <polacek@redhat.com>
2254
2255 PR c/60439
2256 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
2257 c_start_case.
2258 * c-tree.h (c_start_case): Update.
2259 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
2260 switch condition has boolean value.
2261
9b2b7279
AM
22622014-06-02 Andrew MacLeod <amacleod@redhat.com>
2263
2264 * c-decl.c: Include builtins.h.
2265 * c-parser.c: Likewise.
2266
5c1bc275
MP
22672014-05-27 Marek Polacek <polacek@redhat.com>
2268
2269 PR c/56724
2270 * c-typeck.c (convert_arguments): Get location of a parameter. Change
2271 error and warning calls to error_at and warning_at. Pass location of
2272 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
2273 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
2274 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
2275
97563bc8
IZ
22762014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
2277
2278 PR c/61191
2279 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
2280 function parameters.
2281
aede2c10
JH
22822014-05-23 Jan Hubicka <hubicka@ucw.cz>
2283
2284 * c-decl.c (merge_decls): Preserve symtab node pointers.
2285 (duplicate_decls): Free new decl.
2286
edbba2ce
TS
22872014-05-23 Thomas Schwinge <thomas@codesourcery.com>
2288
f3316c6d
TS
2289 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
2290 initialization.
2291
edbba2ce
TS
2292 * c-parser.c (c_parser_omp_target): Return bool values.
2293
68c81f24
TS
22942014-05-22 Thomas Schwinge <thomas@codesourcery.com>
2295
2296 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
2297 num_teams_loc variable to num_thread_limit_loc.
2298
632f2871
RS
22992014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
2300
2301 * c-array-notation.c (expand_array_notations): Use void_node
2302 instead of void_zero_node.
2303
766090c2
TS
23042014-05-17 Trevor Saunders <tsaunders@mozilla.com>
2305
2306 * c-decl.c (finish_struct): Adjust.
2307 (finish_enum): Likewise.
2308 (bind): Adjust.
2309 (record_inline_static): Likewise.
2310 (push_scope): Likewise.
2311 (make_label): Likewise.
2312 (lookup_label_for_goto): Likewise.
2313 (finish_struct): Likewise.
2314 (finish_enum): Likewise.
2315 (store_parm_decls): Likewise.
2316 (c_push_function_context): Likewise.
2317 * c-lang.h: Remove usage of variable_size gty attribute.
2318 * c-parser.c (c_parse_init): Adjust.
2319 (c_parse_file): Likewise.
2320
2b107f6b
MP
23212014-05-13 Marek Polacek <polacek@redhat.com>
2322
2323 PR c/61162
2324 * c-typeck.c (convert_for_assignment): Pass location to
2325 WARN_FOR_ASSIGNMENT instead of input_location.
2326
d033409e
MP
23272014-05-10 Marek Polacek <polacek@redhat.com>
2328
2329 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
2330 maybe_warn_string_init.
2331 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
2332 maybe_warn_string_init.
2333 * c-tree.h (maybe_warn_string_init): Update declaration.
2334 * c-typeck.c (maybe_warn_string_init): Add location parameter.
2335 Call pedwarn_init with loc instead of with input_location.
2336 (digest_init): Pass init_loc to maybe_warn_string_init.
2337 (pop_init_level): Call pedwarn_init with loc instead of with
2338 input_location.
2339 (set_init_index): Likewise.
2340 (process_init_element): Likewise.
2341
ea58ef42
MP
23422014-05-09 Marek Polacek <polacek@redhat.com>
2343
2344 PR c/61096
2345 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
2346 (c_parser_initelt): Pass location to set_init_label. Pass array index
2347 location to set_init_index.
2348 * c-tree.h (push_init_level): Update declaration.
2349 (pop_init_level): Likewise.
2350 (set_init_index): Likewise.
2351 (set_init_label): Likewise.
2352 * c-typeck.c (error_init): Add location parameter. Call error_at
2353 instead of error.
2354 (digest_init): Pass init_loc to error_init.
2355 (really_start_incremental_init):
2356 (push_init_level): Add location parameter. Pass loc to pop_init_level
2357 and error_init.
2358 (pop_init_level): Likewise.
2359 (set_designator): Add location parameter. Pass loc to pop_init_level,
2360 push_init_level, and error_init.
2361 (set_init_index): Add location parameter. Pass loc to error_init and
2362 set_designator.
2363 (set_init_label): Likewise.
2364 (output_init_element): Pass loc to error_init.
2365 (process_init_element): Pass loc to error_init, pop_init_level,
2366 pedwarn_init, and push_init_level.
2367
661a0813
MP
23682014-05-09 Marek Polacek <polacek@redhat.com>
2369
2370 PR c/50459
2371 * c-parser.c (c_parser_attributes): Parse the arguments as an
2372 expression-list if the attribute takes identifier.
2373
2793eeab
MP
23742014-05-08 Marek Polacek <polacek@redhat.com>
2375
2376 PR c/61053
2377 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
2378 TYPE_ALIGN_UNIT.
2379
f827930a
MP
23802014-05-08 Marek Polacek <polacek@redhat.com>
2381
2382 PR c/61077
2383 * c-decl.c (start_function): Warn for _Atomic-qualified return type
2384 of main.
2385
1d60af08
KZ
23862014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
2387 Mike Stump <mikestump@comcast.net>
2388 Richard Sandiford <rdsandiford@googlemail.com>
2389
2390 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
2391 (finish_enum): Use wide-int interfaces.
2392 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
2393 * c-typeck.c (build_c_cast): Likewise.
2394 (set_nonincremental_init_from_string): Likewise.
2395 (c_tree_equal): Likewise.
2396
a0e24419
MP
23972014-05-02 Marek Polacek <polacek@redhat.com>
2398
2399 PR c/25801
2400 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
2401 Return size_one_node when the type is not complete.
2402 (pointer_diff): Remove comment.
2403 (build_unary_op): Improve error messages.
2404
19fc9faa
MP
24052014-05-02 Marek Polacek <polacek@redhat.com>
2406
2407 * c-typeck.c (c_finish_return): Separate warning_at calls.
2408
63bc4e87
MP
24092014-05-02 Marek Polacek <polacek@redhat.com>
2410
2411 * c-tree.h (error_init): Remove declaration.
2412 (pedwarn_init): Likewise.
2413 * c-typeck.c (error_init): Make static and move above.
2414 (pedwarn_init): Likewise.
2415 (warning_init): Move above.
2416 (maybe_warn_string_init): Likewise.
2417
4bd2511b
JL
24182014-05-01 Jeff Law <law@redhat.com>
2419
2420 Revert:
2421
2422 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2423 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
2424 avoid goto.
2425
6a358dcb
MP
24262014-05-02 Marek Polacek <polacek@redhat.com>
2427
2428 PR c/60784
2429 * c-typeck.c (push_init_level): Set constructor_designated to
2430 p->designated for structures.
2431
ae5ebda4
MP
24322014-05-01 Marek Polacek <polacek@redhat.com>
2433
2434 PR c/60915
2435 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
2436 function-definition has an attribute after the declarator.
2437
96b40f8d
MP
24382014-05-01 Marek Polacek <polacek@redhat.com>
2439
2440 PR c/60257
2441 * c-typeck.c (warning_init): Add location_t parameter. Call
2442 warning_at instead of warning.
2443 (push_init_level): Pass input_location to warning_init.
2444 (add_pending_init): Add location_t parameter. Pass loc to
2445 warning_init.
2446 (set_nonincremental_init): Pass input_location to add_pending_init.
2447 (set_nonincremental_init_from_string): Likewise.
2448 (output_init_element): Pass loc to warning_init and to
2449 add_pending_init.
2450
32e00768
MP
24512014-05-01 Marek Polacek <polacek@redhat.com>
2452
2453 PR c/43395
2454 * c-typeck.c (c_finish_return): Distinguish between label and variable
2455 when warning about returning local address.
2456
c9379ce2
MP
24572014-05-01 Marek Polacek <polacek@redhat.com>
2458
2459 PR c/29467
2460 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
2461 in C89 mode.
2462
d00887e8
MP
24632014-05-01 Marek Polacek <polacek@redhat.com>
2464
2465 PR c/43245
2466 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
2467 instead of 0 to WARN_FOR_QUALIFIERS.
2468
5436fa2e
MP
24692014-05-01 Marek Polacek <polacek@redhat.com>
2470
2471 PR c/56989
2472 * c-typeck.c (default_conversion): Use better location for
2473 error call.
2474
f8ed5150
MP
24752014-04-30 Marek Polacek <polacek@redhat.com>
2476
2477 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
2478 also when SANITIZE_FLOAT_DIVIDE is on.
2479
8337d1db
MP
24802014-04-30 Marek Polacek <polacek@redhat.com>
2481
2482 PR c/60139
2483 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
2484 and pedwarn_init. Use loc insted of input_location.
2485
c4bdc42f
MP
24862014-04-30 Marek Polacek <polacek@redhat.com>
2487
2488 PR c/60351
2489 * c-typeck.c (build_binary_op): Use location when warning about
2490 shift count.
2491
45484dcf
MP
24922014-04-25 Marek Polacek <polacek@redhat.com>
2493
2494 PR c/18079
2495 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
2496 always_inline/noinline and hot/cold attributes.
2497
34cf811f
MP
24982014-04-25 Marek Polacek <polacek@redhat.com>
2499
2500 PR c/60114
2501 * c-parser.c (c_parser_initelt): Pass input_location to
2502 process_init_element.
2503 (c_parser_initval): Pass loc to process_init_element.
2504 * c-tree.h (process_init_element): Adjust declaration.
2505 * c-typeck.c (push_init_level): Pass input_location to
2506 process_init_element.
2507 (pop_init_level): Likewise.
2508 (set_designator): Likewise.
2509 (output_init_element): Add location_t parameter. Pass loc to
2510 digest_init.
2511 (output_pending_init_elements): Pass input_location to
2512 output_init_element.
2513 (process_init_element): Add location_t parameter. Pass loc to
2514 output_init_element.
2515
42056eac
JJ
25162014-04-24 Jakub Jelinek <jakub@redhat.com>
2517
2518 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
2519 atomic-clause, allow comma in between atomic-clause and
2520 seq_cst.
2521
e162a134
JJ
25222014-04-22 Jakub Jelinek <jakub@redhat.com>
2523
2524 PR c/59073
2525 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
2526 fails, don't set OM_PARALLEL_COMBINED and return NULL.
2527
2f6babac
IZ
25282014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
2529
2530 PR middle-end/60469
2531 * c-array-notation.c (fix_builtin_array_notation_fn): Use
2532 create_tmp_var instead build_decl for creating temps.
2533 (build_array_notation_expr): Likewise.
2534 (fix_conditional_array_notations_1): Likewise.
2535 (fix_array_notation_expr): Likewise.
2536 (fix_array_notation_call_expr): Likewise.
2537
8edbfaa6
JJ
25382014-03-28 Jakub Jelinek <jakub@redhat.com>
2539
2540 PR c++/60689
2541 * c-tree.h (c_build_function_call_vec): New prototype.
2542 * c-typeck.c (build_function_call_vec): Don't call
2543 resolve_overloaded_builtin here.
2544 (c_build_function_call_vec): New wrapper function around
2545 build_function_call_vec. Call resolve_overloaded_builtin here.
2546 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
2547 Call c_build_function_call_vec instead of build_function_call_vec.
2548 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
2549 * c-decl.c (finish_decl): Likewise.
2550
7485aeea
MLI
25512014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2552
2553 PR c/55383
2554 * c-typeck.c: Use correct format string in cast-qual warning
2555
b17a8b07
TS
25562014-03-07 Thomas Schwinge <thomas@codesourcery.com>
2557
2558 * c-decl.c (c_decl_attributes): Use
2559 lang_hooks.types.omp_mappable_type.
2560 * c-typeck.c (c_finish_omp_clauses): Likewise.
2561
3af9c5e9
MP
25622014-03-06 Marek Polacek <polacek@redhat.com>
2563
2564 PR c/60197
2565 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
2566 of checking tree code.
2567
1c9f5f33
PK
25682014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2569
2570 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
2571 (c_parser_parameter_declaration): Likewise.
2572
cc28fc7f
MP
25732014-02-19 Marek Polacek <polacek@redhat.com>
2574
2575 PR c/60195
2576 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
2577 Call mark_exp_read on exp.value.
2578 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
2579 TREE_ADDRESSABLE on old instead of val.
2580 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
2581
b581c05c
PK
25822014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
2583
2584 * c-parser.c (c_parser_get_builtin_args): Replace calls to
2585 C_EXPR_APPEND by vec_safe_push.
2586 * c-tree.h (C_EXPR_APPEND): Remove.
2587
81e5eca8
MP
25882014-01-31 Marek Polacek <polacek@redhat.com>
2589
2590 PR c/59963
2591 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
2592 build_function_call_vec.
2593 (build_function_call): Likewise.
2594 (build_atomic_assign): Likewise.
2595 (build_function_call_vec): Add arg_loc parameter. Use it.
2596 (convert_arguments): Likewise.
2597 (convert_for_assignment): Rename rhs_loc to expr_loc.
2598 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
2599 (c_parser_objc_keywordexpr): Likewise.
2600 (c_parser_postfix_expression_after_primary): Call
2601 build_function_call_vec with expr_loc rather than op_loc.
2602 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
2603 build_function_call_vec.
2604 (c_parser_expr_list): Add locations parameter. Fill it with locations
2605 of function arguments.
2606 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
2607
68fca595
MP
26082014-01-30 Marek Polacek <polacek@redhat.com>
2609
2610 PR c/59940
2611 * c-typeck.c (build_function_call_vec): Use loc parameter.
2612 (convert_arguments): Add location parameter. Use it.
2613 (ep_convert_and_check): Likewise.
2614 (build_atomic_assign): Adjust convert_for_assignment call.
2615 (build_modify_expr): Likewise.
2616 (digest_init): Likewise.
2617 (c_finish_return): Likewise.
2618 (build_conditional_expr): Adjust ep_convert_and_check calls.
2619 (convert_for_assignment): Add rhs_loc parameter. Use it.
2620 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
2621 calls.
2622
fa337f3a
RB
26232014-01-30 Richard Biener <rguenther@suse.de>
2624
2625 PR c/59905
2626 * c-typeck.c (build_function_call_vec): Do not replace calls
2627 to a function via an incompatible type with a runtime abort.
2628
b72271b9
BI
26292014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
2630
2631 * c-parser.c (c_parser_declaration_or_fndef): Replaced
2632 flag_enable_cilkplus with flag_cilkplus.
2633 (c_parser_direct_declarator_inner): Likewise.
2634 (c_parser_attribute_any_word): Likewise.
2635 (c_parser_attributes): Likewise.
2636 (c_parser_compound_statement): Likewise.
2637 (c_parser_statement_after_labels): Likewise.
2638 (c_parser_if_statement): Likewise.
2639 (c_parser_switch_statement): Likewise.
2640 (c_parser_do_statement): Likewise.
2641 (c_parser_for_statement): Likewise.
2642 (c_parser_unary_expression): Likewise.
2643 (c_parser_postfix_expression): Likewise.
2644 (c_parser_postfix_expression_after_primary): Likewise.
2645 (c_parser_postfix_expression_after_primary): Likewise.
2646 (c_parser_omp_clause_name): Likewise.
2647 (c_finish_omp_declare_simd): Likewise.
2648 (c_parser_cilk_verify_simd): Likewise.
2649 * c-typeck.c (build_array_ref): Likewise.
2650 (build_function_call_vec): Likewise.
2651 (convert_arguments): Likewise.
2652 (build_compound_expr): Likewise.
2653 (c_finish_return): Likewise.
2654 (c_finish_if_stmt): Likewise.
2655 (c_finish_loop): Likewise.
2656 (build_binary_op): Likewise.
2657
393e8e8b
MP
26582014-01-23 Marek Polacek <polacek@redhat.com>
2659
2660 PR c/59846
2661 * c-typeck.c (parser_build_binary_op): Use location instead of
2662 input_location.
2663 (build_binary_op): Pass location to shorten_compare.
2664
f04dda30
MP
26652014-01-23 Marek Polacek <polacek@redhat.com>
2666
2667 PR c/58346
2668 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
2669 an empty aggregate.
2670
789eadcd
MP
26712014-01-23 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/59871
2674 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
2675 of a comma expression.
2676 (emit_side_effect_warnings): Likewise.
2677
40f14e9f
BI
26782014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2679
2680 PR c/59825
2681 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
2682 function to use walk_tree and moved a lot of its functionality to
2683 expand_array_notations.
2684 (expand_array_notations): New function.
2685
74558dd9
BI
26862014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
2687
2688 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
2689 attribute an attribute without value.
2690
652fea39
JJ
26912014-01-23 Jakub Jelinek <jakub@redhat.com>
2692
2693 PR middle-end/58809
2694 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
2695 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
2696
f34f1c87
MP
26972014-01-22 Marek Polacek <polacek@redhat.com>
2698
2699 PR c/59891
2700 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
2701 of remove_c_maybe_const_expr on op1 and op2.
2702
241f845a
JJ
27032014-01-15 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR c/58943
2706 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
2707 effects, preevaluate rhs using SAVE_EXPR first.
2708
9a74f20c
BI
27092014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
2710
2711 PR c++/59631
2712 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
2713 statements with if-elseif statements.
2714
96066ce1
MP
27152014-01-06 Marek Polacek <polacek@redhat.com>
2716
2717 PR c/57773
2718 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
2719 defined bit-field types only in ISO C.
2720
23a5b65a
RS
27212014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2722
2723 Update copyright years
2724
f9030485
RS
27252014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
2726
2727 * c-array-notation.c: Use the standard form for the copyright notice.
2728
41958c28
BI
27292013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
2730
2731 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
2732 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
2733 field in parser is not empty. If not-empty, call the function
2734 c_parser_finish_omp_declare_simd.
2735 (c_parser_cilk_clause_vectorlength): Modified function to be shared
2736 between SIMD-enabled functions and #pragma simd. Added new parameter.
2737 (c_parser_cilk_all_clauses): Modified the usage of the function
2738 c_parser_cilk_clause_vectorlength as mentioned above.
2739 (c_parser_cilk_simd_fn_vector_attrs): New function.
2740 (c_finish_cilk_simd_fn_tokens): Likewise.
2741 (is_cilkplus_vector_p): Likewise.
2742 (c_parser_omp_clause_name): Added checking for "vectorlength,"
2743 "nomask," and "mask" strings in clause name.
2744 (c_parser_omp_all_clauses): Added 3 new case statements:
2745 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
2746 PRAGMA_CILK_CLAUSE_NOMASK.
2747 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
2748 check for vector attribute and if so call the function
2749 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
2750 called the function c_finish_cilk_simd_fn_tokens.
2751 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
2752 parser field is non-empty. If so, parse them as you would parse
2753 the omp declare simd pragma.
2754 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
2755 Added a check when step is a parameter and flag it as error.
2756 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
2757 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
2758 pragma_omp_clause.
2759
cef0fd0e
TS
27602013-12-17 Thomas Schwinge <thomas@codesourcery.com>
2761
2762 * c-parser.c (c_parser_omp_parallel): Fix description.
2763
12893402
BI
27642013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
2765
2766 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
2767 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
2768 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
2769 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
2770
296674db
JM
27712013-12-04 Joseph Myers <joseph@codesourcery.com>
2772
2773 PR c/52023
2774 * c-parser.c (c_parser_alignas_specifier): Use
2775 c_sizeof_or_alignof_type instead of c_alignof.
2776 (c_parser_alignof_expression): Likewise, with min_alignof
2777 parameter depending on alignof spelling used.
2778
edd28054
MP
27792013-12-04 Marek Polacek <polacek@redhat.com>
2780
2781 PR c/54113
2782 * c-decl.c (start_function): Don't warn for missing prototype for
2783 inline functions.
2784
da0fc454
MP
27852013-12-03 Marek Polacek <polacek@redhat.com>
2786
2787 PR c/59351
2788 * c-decl.c (build_compound_literal): Allow compound literals with
2789 empty initial value.
2790
4c2ecab0
JM
27912013-12-02 Joseph Myers <joseph@codesourcery.com>
2792
2793 PR c/58235
2794 * c-typeck.c (build_modify_expr): Diagnose assignment to
2795 expression with array type.
2796
340baef7
JM
27972013-11-29 Joseph Myers <joseph@codesourcery.com>
2798
2799 PR c/42262
2800 * c-typeck.c (process_init_element): Do not treat a string as
2801 initializing a whole array when used with a designator for an
2802 individual element.
2803
6763b9f7
JM
28042013-11-29 Joseph Myers <joseph@codesourcery.com>
2805
2806 PR c/57574
2807 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
2808 an inline function following a static declaration.
2809
e7bd1de1
JJ
28102013-11-28 Jakub Jelinek <jakub@redhat.com>
2811
2812 PR c/59310
2813 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
2814 to p_name before calling c_parser_omp_teams instead of after.
2815 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
2816 argument. Remove unused p_name variable.
2817
0136f8f0
AH
28182013-11-27 Aldy Hernandez <aldyh@redhat.com>
2819 Jakub Jelinek <jakub@redhat.com>
2820
2821 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
2822 external_scope is NULL.
2823
241b71bb
TV
28242013-11-27 Tom de Vries <tom@codesourcery.com>
2825 Marc Glisse <marc.glisse@inria.fr>
2826
2827 PR c++/59032
2828 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
2829
2fb9a547
AM
28302013-11-22 Andrew MacLeod <amacleod@redhat.com>
2831
2832 * c-typeck.c: Add required include files from gimple.h.
2833
8400e75e
DM
28342013-11-22 David Malcolm <dmalcolm@redhat.com>
2835
2836 * c-decl.c (define_label, shadow_tag_warned)
2837 (check_bitfield_type_and_width, grokdeclarator, grokparms,
2838 store_parm_decls_newstyle, store_parm_decls_oldstyle)
2839 (declspecs_add_type): Remove use of in_system_header macro.
2840 * c-parser.c (c_parser_unary_expression): Likewise.
2841 * c-typeck.c (store_init_value, process_init_element)
2842 (c_start_case): Likewise.
2843
2844 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
2845 macro.
2846
2847 * c-parser.c (c_parser_set_source_position_from_token): Remove
2848 reference to in_system_header from comment.
2849
386b1f1f
RS
28502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2851
2852 * c-decl.c (grokdeclarator): Update comment to refer to
2853 tree_to_[su]hwi rather than tree_low_cst.
2854
ae7e9ddd
RS
28552013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2856
2857 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
2858 tree_to_uhwi throughout.
2859
9439e9a1
RS
28602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2861
2862 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
2863 throughout.
2864
9541ffee
RS
28652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
2866
2867 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
2868 throughout.
2869
c02065fc
AH
28702013-11-15 Aldy Hernandez <aldyh@redhat.com>
2871
2872 * c-parser.c (c_parser_cilk_simd): New.
2873 (c_parser_cilk_verify_simd): New.
2874 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
2875 (c_parser_omp_for_loop): Add case for NE_EXPR.
2876 Set c_break_label for CILK_SIMD.
2877 (c_parser_cilk_clause_vectorlength): New.
2878 (c_parser_cilk_clause_linear): New.
2879 (c_parser_cilk_clause_name): New.
2880 (c_parser_cilk_all_clauses): New.
2881 * c-typeck.c (build_unary_op): Pass location argument to
2882 readonly_error.
2883 (build_modify_expr): Same.
2884 (build_asm_expr): Same.
2885 (c_finish_bc_stmt): Error on break/continue in loops.
2886
18f429e2
AM
28872013-11-14 Andrew MacLeod <amacleod@redhat.com>
2888
2889 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
2890
d8a2d370
DN
28912013-11-14 Diego Novillo <dnovillo@google.com>
2892
2893 * c-decl.c: Include print-tree.h.
2894 Include stor-layout.h.
2895 Include varasm.h.
2896 Include attribs.h.
2897 Include stringpool.h.
2898 * c-lang.c: Include fold-const.h.
2899 * c-parser.c: Include stringpool.h.
2900 Include attribs.h.
2901 Include stor-layout.h.
2902 Include varasm.h.
2903 Include trans-mem.h.
2904 * c-typeck.c: Include stor-layout.h.
2905 Include trans-mem.h.
2906 Include varasm.h.
2907 Include stmt.h.
2908
38b7bc7f
JM
29092013-11-13 Joseph Myers <joseph@codesourcery.com>
2910
2911 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
2912 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
2913 __auto_type.
2914 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
2915 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
2916 RID_AUTO_TYPE.
2917 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
2918 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
2919 (c_parser_declarator, c_parser_direct_declarator_inner)
2920 (c_parser_parameter_declaration, c_parser_type_name): All callers
2921 changed.
2922 (c_parser_declaration_or_fndef): Handle declarations with type
2923 determined from the initializer.
2924
45b0be94
AM
29252013-11-12 Andrew MacLeod <amacleod@redhat.com>
2926
18f429e2 2927 * c-typeck.c: Include gimplify.h.
45b0be94 2928
582d9b50
JM
29292013-11-12 Joseph Myers <joseph@codesourcery.com>
2930
2931 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
2932 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
2933 comment.
2934 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
2935 or _Thread_local as appropriate in diagnostics.
2936 (build_null_declspecs): Initialize ret->thread_gnu_p.
2937 (declspecs_add_scspec): Handle either __thread or _Thread_local
2938 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
2939 pedantic. Do not disallow _Thread_local extern and _Thread_local
2940 static.
2941
267bac10
JM
29422013-11-07 Joseph Myers <joseph@codesourcery.com>
2943 Andrew MacLeod <amacleod@redhat.com>
2944
2945 * c-aux-info.c (gen_type): Handle atomic qualifier.
2946 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
2947 qualifiers when compating types.
2948 (shadow_tag_warned): Handle atomic_p in declspecs.
2949 (quals_from_declspecs): Likewise.
2950 (start_decl): Use c_type_promotes_to when promoting argument
2951 types.
2952 (grokdeclarator): Handle _Atomic.
2953 (get_parm_info): Diagnose any qualifier on "void" as only
2954 parameter.
2955 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
2956 comparing types. Use c_type_promotes_to when promoting argument
2957 types.
2958 (finish_function): Use c_type_promotes_to when promoting argument
2959 types.
2960 (build_null_declspecs): Handle atomic_p in declspecs.
2961 (declspecs_add_qual): Handle RID_ATOMIC.
2962 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
2963 (c_token_starts_declspecs): Handle RID_ATOMIC.
2964 (c_parser_declspecs): Handle atomic type specifiers and
2965 qualifiers.
2966 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
2967 from types of expressions with atomic type.
2968 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
2969 (c_parser_attribute_any_word): Handle RID_ATOMIC.
2970 (c_parser_initializer, c_parser_initelt, c_parser_initval)
2971 (c_parser_statement_after_labels, c_parser_switch_statement)
2972 (c_parser_for_statement, c_parser_expr_no_commas)
2973 (c_parser_conditional_expression, c_parser_binary_expression)
2974 (c_parser_cast_expression, c_parser_unary_expression)
2975 (c_parser_postfix_expression)
2976 (c_parser_postfix_expression_after_primary, c_parser_expression):
2977 Use convert_lvalue_to_rvalue.
2978 (c_parser_expression_conv, c_parser_expr_list): Document
2979 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
2980 (c_parser_objc_synchronized_statement): Use
2981 convert_lvalue_to_rvalue.
2982 (c_parser_objc_selector): Handle RID_ATOMIC.
2983 (c_parser_objc_receiver, c_parser_array_notation): Use
2984 convert_lvalue_to_rvalue.
2985 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
2986 _Atomic (type-name).
2987 (struct c_declspecs): Add atomic_p field.
2988 (convert_lvalue_to_rvalue): Declare.
2989 * c-typeck.c (c_type_promotes_to): Promote atomic types to
2990 corresponding atomic types.
2991 (qualify_type): Don't add _Atomic qualifiers from second argument.
2992 (comp_target_types): Do not allow _Atomic mismatches.
2993 (type_lists_compatible_p): Do not remove atomic qualifiers when
2994 comparing types.
2995 (really_atomic_lvalue, convert_lvalue_to_rvalue)
2996 (build_atomic_assign): New functions.
2997 (build_unary_op): Use build_atomic_assign for atomic increment and
2998 decrement.
2999 (build_conditional_expr): Do not treat _Atomic void as a qualified
3000 version of void.
3001 (build_modify_expr): Use build_atomic_assign for atomic LHS.
3002 (find_anonymous_field_with_type, convert_to_anonymous_field)
3003 (convert_for_assignment): Do not remove atomic qualifiers when
3004 comparing types.
3005 (digest_init): Do not accept initialization of arrays of atomic
3006 elements by string constants.
3007 (build_asm_expr): Use convert_lvalue_to_rvalue.
3008 (build_binary_op): Do not treat _Atomic void as a qualified
3009 version of void.
3010
0c249d4b
DD
30112013-11-06 DJ Delorie <dj@redhat.com>
3012
3013 * c-decl.c (locate_old_decl): If a previous conflicting decl is
3014 both explicit and builtin, print the location of the explicit one.
3015
6d7f7e0a
TB
30162013-11-05 Tobias Burnus <burnus@net-b.de>
3017
3018 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
3019 c_parser_omp_distribute, c_parser_omp_teams,
3020 c_parser_omp_target, c_parser_omp_declare): Handle
3021 -fopenmp-simd.
3022
b906f4ca
MP
30232013-11-03 Marek Polacek <polacek@redhat.com>
3024
3025 * c-decl.c (grokdeclarator): Add VLA instrumentation.
3026
ee1d5a02
JJ
30272013-11-01 Jakub Jelinek <jakub@redhat.com>
3028
3029 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
3030 check_dup_generic at the end, unless remove is true.
3031 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
3032 remove = true;.
3033 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
3034
5a9785fb
JJ
30352013-10-31 Jakub Jelinek <jakub@redhat.com>
3036
3037 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
3038 with decl that is not pointer nor array.
3039
939b37da
BI
30402013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
3041
3042 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
3043 a spawning function is found.
3044 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
3045 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
3046 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
3047 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
3048 case.
3049 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
3050 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
3051 expr.
3052 (c_finish_return): Added a check to reject _Cilk_spawn in return
3053 expression.
3054 (build_cilk_spawn): New function.
3055 (build_cilk_sync): Likewise.
3056 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
3057
d4af74d4
TB
30582013-10-27 Tobias Burnus <burnus@net-b.de>
3059
3060 PR other/33426
3061 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
3062 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
3063 (c_parser_statement_after_labels): Update calls.
3064
d73749df 30652013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
3066
3067 PR other/33426
3068 * c-parser.c (c_parser_pragma, c_parser_for_statement):
3069 Handle PRAGMA_IVDEP.
3070 (c_parser_statement_after_labels): Update call.
3071
f28aa681
MP
30722013-10-24 Marek Polacek <polacek@redhat.com>
3073
3074 * c-parser.c (c_parser_struct_declaration): Add a comment.
3075 (c_parser_declarator): Don't allow _Alignas here.
3076
0645c1a2
AM
30772013-10-17 Andrew MacLeod <amacleod@redhat.com>
3078
3079 * c-parser.c: Include omp-low.h.
3080 * c-typeck.c: Likewise.
3081
568a31f2
MP
30822013-10-17 Marek Polacek <polacek@redhat.com>
3083
3084 PR c/58267
3085 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
3086 Document syntax of the array-declarator.
3087 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
3088 are not permitted.
3089 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
3090 (c_parser_struct_declaration): Likewise.
3091 (c_parser_declarator): Likewise.
3092 (c_parser_direct_declarator_inner): Likewise.
3093 (c_parser_parameter_declaration): Likewise.
3094 (c_parser_type_name): Likewise.
3095
acf0174b
JJ
30962013-10-11 Jakub Jelinek <jakub@redhat.com>
3097
3098 * c-lang.h (current_omp_declare_target_attribute): New extern
3099 decl.
3100 * c-parser.c: Include c-lang.h.
3101 (struct c_parser): Change tokens to c_token *.
3102 Add tokens_buf field. Change tokens_avail type to unsigned int.
3103 (c_parser_consume_token): If parser->tokens isn't
3104 &parser->tokens_buf[0], increment parser->tokens.
3105 (c_parser_consume_pragma): Likewise.
3106 (enum pragma_context): Add pragma_struct and pragma_param.
3107 (c_parser_external_declaration): Adjust
3108 c_parser_declaration_or_fndef caller.
3109 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
3110 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
3111 Adjust recursive call.
3112 (c_parser_struct_or_union_specifier): Use pragma_struct instead
3113 of pragma_external.
3114 (c_parser_parameter_declaration): Use pragma_param instead of
3115 pragma_external.
3116 (c_parser_compound_statement_nostart, c_parser_label,
3117 c_parser_for_statement): Adjust
3118 c_parser_declaration_or_fndef callers.
3119 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
3120 it through to c_parser_conditional_expression.
3121 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
3122 pass it through to c_parser_binary_expression. Adjust recursive
3123 call.
3124 (c_parser_binary_expression): Remove prec argument, add
3125 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
3126 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
3127 binop matches it, use build2 instead of parser_build_binary_op.
3128 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
3129 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
3130 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
3131 Handle pragma_struct and pragma_param the same as pragma_external.
3132 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
3133 (c_parser_omp_variable_list): Parse array sections for
3134 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
3135 (c_parser_omp_clause_collapse): Fully fold collapse expression.
3136 (c_parser_omp_clause_reduction): Handle user defined reductions.
3137 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
3138 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
3139 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
3140 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
3141 c_parser_omp_clause_depend, c_parser_omp_clause_map,
3142 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
3143 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
3144 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
3145 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
3146 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
3147 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
3148 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
3149 (c_parser_omp_for_loop): Add CODE argument, pass it through
3150 to c_finish_omp_for. Change last argument to cclauses,
3151 and adjust uses to grab parallel clauses from the array of all
3152 the split clauses. Adjust c_parser_binary_expression,
3153 c_parser_declaration_or_fndef and c_finish_omp_for callers.
3154 (omp_split_clauses): New function.
3155 (c_parser_omp_simd): New function.
3156 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
3157 Allow the function to be called also when parsing combined constructs,
3158 and call c_parser_omp_simd when parsing for simd.
3159 (c_parser_omp_sections_scope): If section-sequence doesn't start with
3160 #pragma omp section, require exactly one structured-block instead of
3161 sequence of statements.
3162 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
3163 Allow the function to be called also when parsing combined constructs.
3164 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
3165 Allow the function to be called also when parsing combined
3166 constructs.
3167 (c_parser_omp_taskgroup, c_parser_omp_cancel,
3168 c_parser_omp_cancellation_point, c_parser_omp_distribute,
3169 c_parser_omp_teams, c_parser_omp_target_data,
3170 c_parser_omp_target_update, c_parser_omp_target,
3171 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
3172 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
3173 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
3174 (c_parser_omp_construct): Add p_name and mask vars. Handle
3175 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
3176 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
3177 and c_parser_omp_sections callers.
3178 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
3179 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
3180 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
3181 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
3182 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
3183 OMP_CLAUSE_DEPEND.
3184 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
3185 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
3186 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
3187 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
3188 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
3189 * c-typeck.c: Include tree-inline.h.
3190 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
3191 handle_omp_array_sections_1, handle_omp_array_sections,
3192 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
3193 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
3194 user defined reductions.
3195 (c_tree_equal): New function.
3196 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
3197 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
3198 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
3199 c_check_omp_declare_reduction_r): New prototypes.
3200 * c-decl.c (current_omp_declare_target_attribute): New variable.
3201 (c_decl_attributes): New function.
3202 (start_decl, start_function): Use it instead of decl_attributes.
3203 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
3204 c_omp_reduction_decl, c_omp_reduction_lookup,
3205 c_check_omp_declare_reduction_r): New functions.
3206
0a6c2227
TT
32072013-09-25 Tom Tromey <tromey@redhat.com>
3208
3209 * Make-lang.in (c/gccspec.o): Remove.
3210 (CFLAGS-c/gccspec.o): New variable.
3211 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
3212 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
3213 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
3214
f3bc55f0
TT
32152013-09-25 Tom Tromey <tromey@redhat.com>
3216
3217 * Make-lang.in (c/gccspec.o): Don't use subshell.
3218
a24d975c
MP
32192013-09-18 Marek Polacek <polacek@redhat.com>
3220
3221 PR sanitize/58443
3222 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
3223 Remove unnecessary check.
3224
ce6923c5
MP
32252013-09-18 Marek Polacek <polacek@redhat.com>
3226
3227 PR sanitizer/58411
3228 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
3229 no_sanitize_undefined attribute.
3230
a1e51df9
KT
32312013-09-13 Kai Tietz <ktietz@redhat.com>
3232
3233 PR target/57848
3234 * c-decl.c (c_builtin_function_ext_scope): Remove
3235 wrong assumption that it is never called on prexisting
3236 symbol.
3237
0af94e6f
JR
32382013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
3239
3240 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
3241
20059c8b
GDR
32422013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3243
3244 * c-objc-common.c (c_tree_printer): Tidy.
3245
de5a5fa1
MP
32462013-08-30 Marek Polacek <polacek@redhat.com>
3247
3248 * c-typeck.c (build_binary_op): Add division by zero and shift
3249 instrumentation.
3250
2531a1d9 32512013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 3252 Joseph Myers <joseph@codesourcery.com>
2531a1d9 3253
6e2bcc98 3254 PR c/35649
2531a1d9
JR
3255 * c-typeck.c (c_common_type): Prefer double_type_node over
3256 other REAL_TYPE types with the same precision.
3257 (convert_arguments): Likewise.
3258
025311c4
GDR
32592013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3260
3261 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
3262 (c_initialize_diagnostics): Call a destructor for the early printer.
3263
da6ca2b5
GDR
32642013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3265
3266 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
3267 printer initialization.
3268
318cda85 32692013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 3270
318cda85
BI
3271 PR c/57490
3272 * c-array-notation.c (fix_conditional_array_notations_1): Added a
3273 check for truth values.
3274 (expand_array_notation_exprs): Added truth values case. Removed an
3275 unwanted else. Added for-loop to walk through subtrees in default
3276 case.
3277
b066401f
GDR
32782013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3279
3280 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
3281
fb48aadc
JM
32822013-07-23 Joseph Myers <joseph@codesourcery.com>
3283
3284 * c-parser.c (struct c_generic_association): Fix typo.
3285
433cc7b0
TT
32862013-07-23 Tom Tromey <tromey@redhat.com>
3287 Joseph Myers <joseph@codesourcery.com>
3288
3289 * c-parser.c (struct c_generic_association): New.
3290 (c_generic_association_d): New typedef.
3291 (c_parser_generic_selection): New function.
3292 (c_parser_postfix_expression): Handle RID_GENERIC.
3293
26d40c3d
JM
32942013-07-13 Jason Merrill <jason@redhat.com>
3295
3296 PR c++/57793
3297 * c-decl.c (finish_struct): Check for too-large class.
3298
ecdbd01a 32992013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
3300
3301 PR c/57821
3302 * c-typeck.c (set_init_index): When folding, check for index overflow.
3303
1141ed3f
BI
33042013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3305
3306 * c-parser.c (c_parser_array_notation): Removed rejection of array
3307 notations in an array of function pointers.
3308
713b46fa
BI
33092013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
3310
3311 * c-array-notation.c (make_triplet_val_inv): New function.
3312 (create_cmp_incr): Likewise.
3313 (create_array_refs): Likewise.
3314 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
3315 Also modularized common parts between functions and called the function.
3316 (build_array_notation_expr): Likewise.
3317 (fix_conditional_array_notations_1): Likewise.
3318 (fix_array_notation_expr): Likewise.
3319 (fix_array_notation_call_expr): Likewise.
3320
92f20202
MP
33212013-06-18 Marek Polacek <polacek@redhat.com>
3322
3323 PR c/57630
3324 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
3325
73a23b06
BI
33262013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
3327
3328 * c-array-notation.c (build_array_notation_expr): Reject array notation
3329 mismatch between LHS and RHS even inside a call_expr. Also, removed
3330 a couple while statements that were dead code.
3331
00b8517d
BI
33322013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
3333
3334 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
3335 excessive precision expressions in function parameters. Also removed
3336 couple unwanted while statements.
3337
1509bdda
BI
33382013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3339
3340 * c-array-notation.c (expand_array_notation_exprs): Added
3341 ARRAY_NOTATION_REF case.
3342
d60f1706
BI
33432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
3344
3345 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
3346 function to c-family/array-notation-common.c.
3347 (is_cilkplus_reduce_builtin): Likewise.
3348 (find_rank): Likewise.
3349 (extract_array_notation_exprs): Likewise.
3350 (replace_array_notations): Likewise.
3351 (find_inv_trees): Likewise.
3352 (replace_inv_trees): Likewise.
3353 (contains_array_notation_expr): Likewise.
3354 (find_correct_array_notation_type): Likewise.
3355 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
3356 (struct inv_list): Moved this to c-family/array-notation-common.c.
3357 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
3358
6d6efbb3
BI
33592013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
3360
3361 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
3362 reduction functions outside the for-loop. Added a check if the fundecl
3363 is non-NULL. Finally, removed an unwanted if-statement, and made the
3364 body unconditional.
3365
25c22937
BI
33662013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3367
3368 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
3369 condition of the if-statement matches the rank of else-block and then-
3370 block when array notations are used.
3371 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
3372 expression after the entire function body is parsed.
3373 (c_parser_expr_no_commas): Delayed creating array notation expressions
3374 to the end of function parsing.
3375 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
3376 whole if-statement instead of just the condition.
3377 (expand_array_notation_exprs): Added MODIFY_EXPR case.
3378
edd25645
BI
33792013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
3380
3381 PR c/57474
3382 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
3383 array to NULL_TREE if they are unused. Also added a check for the
3384 field to be NULL before its fields are used in future.
3385
065ce7f1
RO
33862013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3387
3388 PR bootstrap/57450
3389 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
3390 (build_array_notation_expr): Likewise.
3391
36536d79
BI
33922013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
3393
3394 * c-typeck.c (build_array_ref): Added a check to see if array's
3395 index is greater than one. If true, then emit an error.
3396 (build_function_call_vec): Exclude error reporting and checking
3397 for builtin array-notation functions.
3398 (convert_arguments): Likewise.
3399 (c_finish_return): Added a check for array notations as a return
3400 expression. If true, then emit an error.
3401 (c_finish_loop): Added a check for array notations in a loop
3402 condition. If true then emit an error.
3403 (lvalue_p): Added a ARRAY_NOTATION_REF case.
3404 (build_binary_op): Added a check for array notation expr inside
3405 op1 and op0. If present, we call another function to find correct
3406 type.
3407 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
3408 * c-parser.c (c_parser_compound_statement): Check if array
3409 notation code is used in tree, if so, then transform them into
3410 appropriate C code.
3411 (c_parser_expr_no_commas): Check if array notation is used in LHS
3412 or RHS, if so, then build array notation expression instead of
3413 regular modify.
3414 (c_parser_postfix_expression_after_primary): Added a check for
3415 colon(s) after square braces, if so then handle it like an array
3416 notation. Also, break up array notations in unary op if found.
3417 (c_parser_direct_declarator_inner): Added a check for array
3418 notation.
3419 (c_parser_compound_statement): Added a check for array notation in
3420 a stmt. If one is present, then expand array notation expr.
3421 (c_parser_if_statement): Likewise.
3422 (c_parser_switch_statement): Added a check for array notations in
3423 a switch statement's condition. If true, then output an error.
3424 (c_parser_while_statement): Similarly, but for a while.
3425 (c_parser_do_statement): Similarly, but for a do-while.
3426 (c_parser_for_statement): Similarly, but for a for-loop.
3427 (c_parser_unary_expression): Check if array notation is used in a
3428 pre-increment or pre-decrement expression. If true, then expand
3429 them.
3430 (c_parser_array_notation): New function.
3431 * c-array-notation.c: New file.
3432 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
3433
cd192ccc
MS
34342013-05-23 Mike Stump <mikestump@comcast.net>
3435
3436 * c-typeck.c (convert_for_assignment): Handle references to memory
3437 spaces better.
3438
427b248d
JM
34392013-05-16 Jason Merrill <jason@redhat.com>
3440
3441 * Make-lang.in (cc1$(exeext)): Use link mutex.
3442
44d90fe1
PC
34432013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
3444
3445 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
3446 to simply use OPT_Wpointer_arith.
3447 (build_unary_op): Likewise.
3448
4e7d7b3d
JJ
34492013-04-03 Jakub Jelinek <jakub@redhat.com>
3450
3451 PR c/19449
3452 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
3453 argument. If set, or it temporarily for parsing of the first
3454 argument into force_folding_builtin_constant_p.
3455 (c_parser_postfix_expression): Adjust callers.
3456
839b422f
RB
34572013-03-21 Richard Biener <rguenther@suse.de>
3458
3459 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
3460 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
3461
2ee028f1
MP
34622013-02-12 Marek Polacek <polacek@redhat.com>
3463
3464 PR c/44938
3465 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
3466 origtypes to NULL.
3467
8824edff
JJ
34682013-01-24 Jakub Jelinek <jakub@redhat.com>
3469
3470 PR c/56078
3471 * c-typeck.c (set_nonincremental_init_from_string): If
3472 constructor_max_index is NULL, treat it as if tree_int_cst_lt
3473 returned false.
3474 (process_init_element): Likewise.
3475
eadd3d0d
JJ
34762012-12-20 Jakub Jelinek <jakub@redhat.com>
3477
3478 PR c++/55619
3479 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
3480 argument, don't call default_function_array_conversion
3481 nor c_fully_fold here.
3482 (c_parser_asm_statement): Adjust callers.
3483 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
3484 and outputs here, and call default_function_array_conversion
3485 on inputs that don't need to be addressable.
3486
f8a93a2e
JJ
34872012-12-18 Jakub Jelinek <jakub@redhat.com>
3488
3489 PR c/39464
3490 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
3491 warning require that both c_common_unsigned_type as well as
3492 c_common_signed_type is the same for both mvl and mvr types.
3493
9771b263
DN
34942012-11-16 Diego Novillo <dnovillo@google.com>
3495
3496 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
3497
3498 * c-common.c: Use new vec API in vec.h.
3499 * c-common.h: Likewise.
3500 * c-gimplify.c: Likewise.
3501 * c-pragma.c: Likewise.
3502 * c-pretty-print.c: Likewise.
3503 * c-pretty-print.h: Likewise.
3504 * c-semantics.c: Likewise.
3505 * c-decl.c: Likewise.
3506 * c-parser.c: Likewise.
3507 * c-tree.h: Likewise.
3508 * c-typeck.c: Likewise.
3509
880661a4
JW
35102012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
3511
3512 PR c++/54930
3513 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
3514
077d1abe
MLI
35152012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3516
3517 PR c/53066
3518 * c-decl.c (warn_if_shadowing): Do not warn if a variable
3519 shadows a function, unless the variable is a function or a
3520 pointer-to-function.
3521
3a785c97
JJ
35222012-10-12 Jakub Jelinek <jakub@redhat.com>
3523
3524 PR c/54381
3525 * c-parser.c (struct c_tree_loc_pair): Removed.
3526 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
3527 add location_t * and tree * arguments, fill in array of 3
3528 sizeof_arg trees and corresponding locs.
3529 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
3530 c_parser_expr_list callers.
3531 (c_parser_postfix_expression_after_primary): Likewise. Pass
3532 array of 3 sizeof_arg trees and locs (corresponding to first
3533 3 arguments) to sizeof_pointer_memaccess_warning.
3534
703c8606
LC
35352012-10-09 Lawrence Crowl <crowl@google.com>
3536
3537 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
3538 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
3539 hash table.
3540
5d9de0d0
PC
35412012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
3542
3543 PR c++/54194
3544 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
3545 call.
3546
a212e43f
MG
35472012-10-09 Marc Glisse <marc.glisse@inria.fr>
3548
3549 PR c++/54427
3550 * c-typeck.c: Include c-common.h.
3551 (enum stv_conv): Moved to c-common.h.
3552 (scalar_to_vector): Moved to c-common.c.
3553 (build_binary_op): Adapt to scalar_to_vector's new prototype.
3554 * Make-lang.in: c-typeck.c depends on c-common.h.
3555
3b78de56
AC
35562012-10-04 Arnaud Charlet <charlet@adacore.com>
3557
3558 * c-decl.c (c_write_global_declarations): Fix handling of
3559 -fdump-ada-spec*.
3560
78c60e3d
SS
35612012-09-30 Sharad Singhai <singhai@google.com>
3562
3563 * c-decl.c (c_write_global_declarations): Use a different method
3564 to determine if the dump has ben initialized.
3565
9f33203d
JM
35662012-09-14 Joseph Myers <joseph@codesourcery.com>
3567
3568 PR c/54552
3569 * c-typeck.c (c_cast_expr): When casting to a type requiring
3570 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
3571 c_fully_fold first.
3572
a27d595d
JM
35732012-09-14 Joseph Myers <joseph@codesourcery.com>
3574
3575 PR c/54103
3576 * c-typeck.c (build_unary_op): Pass original argument of
3577 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
3578 any C_MAYBE_CONST_EXPR, if it has integer operands.
3579 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
3580 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
3581 to c_objc_common_truthvalue_conversion, then remove any
3582 C_MAYBE_CONST_EXPR, if they have integer operands. Use
3583 c_objc_common_truthvalue_conversion not
3584 c_common_truthvalue_conversion.
3585 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
3586 call note_integer_operands for arguments with integer operands
3587 that are not integer constants.
3588
9feb29df
JJ
35892012-09-13 Jakub Jelinek <jakub@redhat.com>
3590
3591 PR c/54559
3592 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
3593 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
3594
d409320c
JJ
35952012-08-31 Jakub Jelinek <jakub@redhat.com>
3596
3597 PR c/54428
3598 * c-convert.c (convert): Don't call fold_convert_loc if
3599 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
3600 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
3601 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
3602
6265d07c
JJ
36032012-08-24 Jakub Jelinek <jakub@redhat.com>
3604
3605 PR c/54355
3606 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
3607 for nested and empty_ok arguments in the call to
3608 c_parser_declaration_or_fndef.
3609
1a4049e7
JJ
36102012-08-17 Jakub Jelinek <jakub@redhat.com>
3611
3612 * c-tree.h (c_last_sizeof_arg): Declare.
3613 * c-parser.c (struct c_tree_loc_pair): New type.
3614 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
3615 non-NULL.
3616 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
3617 (c_parser_postfix_expression_after_primary): Likewise. Call
3618 sizeof_pointer_memaccess_warning if needed.
3619 (sizeof_ptr_memacc_comptypes): New function.
3620 * c-typeck.c (c_last_sizeof_arg): New global variable.
3621 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
3622
0229aee9
UB
36232012-07-24 Uros Bizjak <ubizjak@gmail.com>
3624
3625 * c-lang.h (lang_decl): Add variable_size GTY option.
3626
7ee2468b
SB
36272012-07-16 Steven Bosscher <steven@gcc.gnu.org>
3628
3629 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
3630 * Make-lang.in: Fix dependencies.
3631
d4a10d0a
SB
36322012-06-29 Steven Bosscher <steven@gcc.gnu.org>
3633
3634 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
3635 and add language Makefile hooks.
3636 * config-lang.in: New file.
3637 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
3638 add the required "normal" config-lang.in rules.
3639 * c-lang.h: Moved from gcc/ to here.
3640 * c-tree.h: Likewise.
3641 * c-objc-common.c: Likewise.
3642 * c-objc-common.h: Likewise.
3643 * c-typeck.c: Likewise.
3644 * c-convert.c: Likewise.
3645 * c-lang.c: Likewise.
3646 * c-aux-info.c: Likewise.
3647 * c-errors.c: Likewise.
3648 * gccspec.c: Likewise.
3649 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
3650 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
3651\f
818ab71a 3652Copyright (C) 2012-2016 Free Software Foundation, Inc.
d4a10d0a
SB
3653
3654Copying and distribution of this file, with or without modification,
3655are permitted in any medium without royalty provided the copyright
3656notice and this notice are preserved.